diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-18 09:25:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-18 09:25:05 +0300 |
commit | b2f0803b5b584c958ca34fbcf39bc48bc45b6fd3 (patch) | |
tree | af5a4784f0d886af2790e68e50edb0249caf51f6 /source/blender/editors/interface/interface_anim.c | |
parent | af51ec3214ec3980c6d729580ed69a7a90e34667 (diff) |
Fix T55511: Decorator drag makes many undo steps
Each keyframe made a separate undo step.
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 82fe32e3747..cda70d405ad 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -326,11 +326,13 @@ void ui_but_anim_paste_driver(bContext *C) void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void *UNUSED(arg_dummy)) { + wmWindowManager *wm = CTX_wm_manager(C); uiBut *but = arg_but; but = but->prev; /* FIXME(campbell), swapping active pointer is weak. */ SWAP(struct uiHandleButtonData *, but->active, but->next->active); + wm->op_undo_depth++; if (but->flag & UI_BUT_DRIVEN) { /* pass */ @@ -354,4 +356,5 @@ void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void *UNUSED(arg_dummy) } SWAP(struct uiHandleButtonData *, but->active, but->next->active); + wm->op_undo_depth--; } |