From df4345dbaaf08de867c7cdc72792564e17ba8f3a Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 10 Mar 2025 12:43:43 +0100 Subject: [PATCH] Fix #135655: Crash when setting Interpolate Sequences curve The curve widget in the redo popup would sent an undo push which it shouldn't really. Since 1bde901bf2 such undo pushes will lead to clearing of the last operation data, which is exactly what the redo popup displays. Buttons in operator redo UIs shouldn't send undo pushes. 179169d6c7 disabled them for the "Adjust Last Operation" panel, but not for this redo popup. In fact there was other code to disable undo for these buttons, but 2d2f23de10 put this into a wrongly scoped conditional branch, so it was only executed on the first full redraw. We can revert 179169d6c7 too now (confirmed already), but I'll do that separately and not in the release branch. Confirmed that the following related issues are all (still) fixed with this: - #55348 - #134505 - #135655 Pull Request: https://projects.blender.org/blender/blender/pulls/135730 --- .../interface_template_operator_property.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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