diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-03-16 19:02:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-03-16 19:05:48 +0300 |
commit | 1f65ab606bcaa6ef60a9e7c9b08b134d46c25e42 (patch) | |
tree | 302d1c2a1932ff1e8366c247a210aa0bb1ffaf83 /source/blender/editors/space_outliner | |
parent | fa9bd044833ba70c64356b1803abcb594a756a62 (diff) |
Fix missing undo pushes in outliner's new datablock management operations.
Not sure why I did not put those from start... Actually *not* having an
undo point here can be problematic, since undoing some previous action
was trying to restore from bad pointer (I think) in UI, generating
asserts.
Note however that it's not a 'pure' undo, in that you may not find your
linked data in exact same state as before deleting it, after an undo,
since it actually implies *reloading* the deleted libraries (and not
restoring from a previously stored memory dump).
Reported by @sergey, thanks.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 4eda7977622..086cc55366b 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1254,6 +1254,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) { if (idlevel > 0) { outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_delete_cb, NULL); + ED_undo_push(C, "Delete"); } break; } @@ -1261,6 +1262,7 @@ static int outliner_id_operation_exec(bContext *C, wmOperator *op) { if (idlevel > 0) { outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_remap_cb, NULL); + ED_undo_push(C, "Remap"); } break; } @@ -1369,18 +1371,20 @@ static int outliner_lib_operation_exec(bContext *C, wmOperator *op) outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, item_rename_cb, NULL); WM_event_add_notifier(C, NC_ID | NA_EDITED, NULL); - ED_undo_push(C, "Rename"); + ED_undo_push(C, "Rename Library"); break; } case OL_LIB_DELETE: { outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_delete_cb, NULL); + ED_undo_push(C, "Delete Library"); break; } case OL_LIB_RELOCATE: { /* rename */ outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, lib_relocate_cb, NULL); + ED_undo_push(C, "Relocate Library"); break; } case OL_LIB_RELOAD: |