[Bf-blender-cvs] [0840469ccd4] master: Fix T71112: UILayout.activate_init when used in popups that refresh

Campbell Barton noreply at git.blender.org
Thu Feb 13 07:08:29 CET 2020


Commit: 0840469ccd4fafc1658628201f297005e27bca71
Author: Campbell Barton
Date:   Thu Feb 13 17:03:55 2020 +1100
Branches: master
https://developer.blender.org/rB0840469ccd4fafc1658628201f297005e27bca71

Fix T71112: UILayout.activate_init when used in popups that refresh

===================================================================

M	source/blender/editors/interface/interface.c
M	source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index a7eec8d42cd..6a5aa59801c 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -889,6 +889,10 @@ bool UI_but_active_only(const bContext *C, ARegion *ar, uiBlock *block, uiBut *b
   return UI_but_active_only_ex(C, ar, block, but, true);
 }
 
+/**
+ * \warning This must run after other handlers have been added,
+ * otherwise the handler wont be removed, see: T71112.
+ */
 bool UI_block_active_only_flagged_buttons(const bContext *C, ARegion *ar, uiBlock *block)
 {
   bool done = false;
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 728bc32e144..7dc5f1d7917 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1467,8 +1467,6 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
 
   UI_block_bounds_set_popup(block, 6 * U.dpi_fac, NULL);
 
-  UI_block_active_only_flagged_buttons(C, ar, block);
-
   return block;
 }



More information about the Bf-blender-cvs mailing list