diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-13 09:03:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-13 09:06:29 +0300 |
commit | 0840469ccd4fafc1658628201f297005e27bca71 (patch) | |
tree | de74f8bd0b54642acf4f9c6cf45aeaf340c0aa23 | |
parent | 57d0e4969d45a503102ee91329c695fe86977c02 (diff) |
Fix T71112: UILayout.activate_init when used in popups that refresh
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
2 files changed, 4 insertions, 2 deletions
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; } |