Fix #134505: Bevel redo panel closes when defining profile

Caused by 1bde901bf2
`UI_BTYPE_CURVEPROFILE` button has undo flag set. see button-layout in:
`edbm_bevel_ui() -> uiTemplateCurveProfile()`.

This  forces an undo push with the help of `ui_apply_but_undo/ui_apply_but_funcs_after`.
To handle the situation, skip undo push for buttons in hud region.

Pull Request: https://projects.blender.org/blender/blender/pulls/134552
This commit is contained in:
Pratik Borhade
2025-02-18 10:43:51 +01:00
committed by Pratik Borhade
parent 996d19d4b3
commit 179169d6c7

View File

@@ -943,6 +943,12 @@ static void ui_apply_but_undo(uiBut *but)
return;
}
/* Skip undo push for buttons in redo panel, see: #134505. */
const ARegion *region = CTX_wm_region(static_cast<bContext *>(but->block->evil_C));
if (region->regiontype == RGN_TYPE_HUD) {
return;
}
const char *str = nullptr;
size_t str_len_clip = SIZE_MAX - 1;
bool skip_undo = false;