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

This commit is contained in:
Campbell Barton 2020-02-13 17:03:55 +11:00
parent 57d0e4969d
commit 0840469ccd
Notes: blender-bot 2023-02-14 10:21:11 +01:00
Referenced by issue #71112, UI: support 'activate_init' for popups which refresh
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}