[Bf-blender-cvs] [3d0b65f89b2] master: Fix T83296: Unknown actions no longer perform an undo push

Greg Neumiller noreply at git.blender.org
Mon Dec 7 04:21:14 CET 2020


Commit: 3d0b65f89b2ddad5141acb00685885a995fdc9f3
Author: Greg Neumiller
Date:   Mon Dec 7 13:32:36 2020 +1100
Branches: master
https://developer.blender.org/rB3d0b65f89b2ddad5141acb00685885a995fdc9f3

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 0688309988e546382748b9e755d84ae8a5059192

Ref D9759

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 3c028977a36..f914ccd7497 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -838,6 +838,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. */



More information about the Bf-blender-cvs mailing list