diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-05 06:46:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-05 06:48:17 +0300 |
commit | 4a08b974f44ef43e7c163f47dd6521df96e0b180 (patch) | |
tree | 1aa8be4e90b87b237162c72454adef4af1c14b29 /source/blender/editors/interface/interface_handlers.c | |
parent | fdcfc263e97324dd991b7251143e6403c61f3c50 (diff) |
Workaround T61948: Undo steps created for non-paint operations
Changing the brush size for example,
was adding redundant undo steps in paint-modes.
For now, don't store undo steps for property changes
in paint & edit modes.
While not ideal, this is similar to 2.7x behavior.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 8ed3f077cbc..0f5f32c46c0 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -756,6 +756,14 @@ static void ui_apply_but_undo(uiBut *but) str = "Unknown Action"; } + /* Optionally override undo when undo system doesn't support storing properties. */ + if (but->rnapoin.id.data) { + ID *id = but->rnapoin.id.data; + if (!ED_undo_is_legacy_compatible_for_property(but->block->evil_C, id)) { + str = ""; + } + } + /* delayed, after all other funcs run, popups are closed, etc */ after = ui_afterfunc_new(); BLI_strncpy(after->undostr, str, sizeof(after->undostr)); |