Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-03-07 08:38:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-07 08:38:22 +0300
commit19ec1bfa89f74dbda02ce62fcf9c88032840c624 (patch)
treee3b498a8d3264bb6be5049e95ac55daa7cf1d9ec /source/blender/editors/interface/interface.c
parent431a5b623e2c7309517bdcaf3e665c08a6c3e2d0 (diff)
Fix T47691: Missing redraw w/ pop-up dialogs
Search buttons would overwrite existing callbacks, even when they weren't needed. Causing missing updates for search buttons in pop-ups.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index c22055701ee..e18066f149e 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -4335,7 +4335,15 @@ void UI_but_func_search_set(
but->search_func = search_func;
but->search_arg = arg;
- UI_but_func_set(but, bfunc, arg, active);
+ if (bfunc) {
+#ifdef DEBUG
+ if (but->func) {
+ /* watch this, can be cause of much confusion, see: T47691 */
+ printf("%s: warning, overwriting button callback with search function callback!\n", __func__);
+ }
+#endif
+ UI_but_func_set(but, bfunc, arg, active);
+ }
/* search buttons show red-alert if item doesn't exist, not for menus */
if (0 == (but->block->flag & UI_BLOCK_LOOP)) {