Fix T46201: Popup menu in post_load handler crash

Match regular file loading logic for new-file operator.
This commit is contained in:
Campbell Barton 2015-09-22 12:23:24 +10:00 committed by Sergey Sharybin
parent a41bdb77d3
commit f6b0194746
1 changed files with 2 additions and 0 deletions

View File

@ -679,6 +679,8 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
BKE_undo_reset();
BKE_undo_write(C, "original"); /* save current state */
CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first);
ED_editors_init(C);
DAG_on_visible_update(CTX_data_main(C), true);