diff --git a/source/blender/editors/interface/templates/interface_template_operator_property.cc b/source/blender/editors/interface/templates/interface_template_operator_property.cc index 346bba0bd9b..d73c3278de8 100644 --- a/source/blender/editors/interface/templates/interface_template_operator_property.cc +++ b/source/blender/editors/interface/templates/interface_template_operator_property.cc @@ -177,14 +177,14 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single( /* set various special settings for buttons */ - /* Only do this if we're not refreshing an existing UI. */ - if (block->oldblock == nullptr) { - const bool is_popup = (block->flag & UI_BLOCK_KEEP_OPEN) != 0; + const bool is_popup = (block->flag & UI_BLOCK_KEEP_OPEN) != 0; - LISTBASE_FOREACH (uiBut *, but, &block->buttons) { - /* no undo for buttons for operator redo panels */ - UI_but_flag_disable(but, UI_BUT_UNDO); + LISTBASE_FOREACH (uiBut *, but, &block->buttons) { + /* no undo for buttons for operator redo panels */ + UI_but_flag_disable(but, UI_BUT_UNDO); + /* Only do this if we're not refreshing an existing UI. */ + if (block->oldblock == nullptr) { /* only for popups, see #36109. */ /* if button is operator's default property, and a text-field, enable focus for it