diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-15 20:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-15 20:37:06 +0300 |
commit | 4461be1b722a4f6e5af4854eb12023b3670a4c3d (patch) | |
tree | 100ebfe3f3d4edc778812a2ce2cf2252553f4058 /source/blender/windowmanager/intern/wm_files.c | |
parent | 91504ed26e426445637a6aa73455052618ff0875 (diff) |
Fix T55032: Redo w/ file saved in edit-mode failed
It's important edit-mode has a step stored for redo to work,
file load now ensures this in a generic way.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index da5ebd7abcd..1f85d764d45 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -516,14 +516,7 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo if (addons_loaded) { wm_file_read_report(C); } - - if (!G.background) { - /* in background mode this makes it hard to load - * a blend file and do anything since the screen - * won't be set to a valid value again */ - CTX_wm_window_set(C, NULL); /* exits queues */ - } - + if (!G.background) { if (wm->undo_stack == NULL) { wm->undo_stack = BKE_undosys_stack_create(); @@ -532,6 +525,14 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo BKE_undosys_stack_clear(wm->undo_stack); } BKE_undosys_stack_init_from_main(wm->undo_stack, CTX_data_main(C)); + BKE_undosys_stack_init_from_context(wm->undo_stack, C); + } + + if (!G.background) { + /* in background mode this makes it hard to load + * a blend file and do anything since the screen + * won't be set to a valid value again */ + CTX_wm_window_set(C, NULL); /* exits queues */ } } |