diff options
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b7b572e7217..5b27fe88b4b 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -2562,23 +2560,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, if(block->curlayout) ui_layout_add_but(block->curlayout, but); -#ifdef WITH_PYTHON_UI_INFO - { - extern void PyC_FileAndNum_Safe(const char **filename, int *lineno); - - const char *fn; - int lineno= -1; - PyC_FileAndNum_Safe(&fn, &lineno); - if (lineno != -1) { - BLI_strncpy(but->py_dbg_fn, fn, sizeof(but->py_dbg_fn)); - but->py_dbg_ln= lineno; - } - else { - but->py_dbg_fn[0]= '\0'; - but->py_dbg_ln= -1; - } + /* if the 'UI_OT_editsource' is running, extract the source info from the button */ + if (UI_editsource_enable_check()) { + UI_editsource_active_but_test(but); } -#endif /* WITH_PYTHON_UI_INFO */ return but; } |