Fix T83296: Unknown actions no longer perform an undo push

str_len_clip is initialized to 0, so when "Unknown Action"
occurs, set str_len_clip appropriately.
Regression in 0688309988

Ref D9759
This commit is contained in:
Greg Neumiller 2020-12-07 13:32:36 +11:00 committed by Jeroen Bakker
parent 29b3035a54
commit 5baac00bce
Notes: blender-bot 2023-02-13 20:20:30 +01:00
Referenced by issue #83296, 2.91 regression: Changing a node's color wheel, color ramp stops, or curves no longer pushes UNDO to the stack.
1 changed files with 1 additions and 0 deletions

View File

@ -842,6 +842,7 @@ static void ui_apply_but_undo(uiBut *but)
/* fallback, else we don't get an undo! */
if (str == NULL || str[0] == '\0' || str_len_clip == 0) {
str = "Unknown Action";
str_len_clip = strlen(str);
}
/* Optionally override undo when undo system doesn't support storing properties. */