diff options
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 2 |
2 files changed, 4 insertions, 1 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--; } diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 1ce34fec118..ff9b08a65c9 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1720,7 +1720,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index block, UI_BTYPE_BUT, 0, ICON_DOT, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Animate property")); UI_but_func_set(but, ui_but_anim_decorate_cb, but, NULL); - but->flag |= UI_BUT_DRAG_LOCK; + but->flag |= UI_BUT_UNDO | UI_BUT_DRAG_LOCK; } else { /* We may show other information here in future, for now use empty space. */ |