diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-08 02:58:18 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-08 03:00:51 +0400 |
commit | 51263c6637906f1f381f3b535120cba163b5ab40 (patch) | |
tree | 484bbc3310052a84ef2690d146b0f98ca8950a5a /source | |
parent | 8e5b02359b8590ac84afe7a61dd9a6dc67cd632e (diff) |
Fix T37731: some window manager operators unnecessarily required a window to be active.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 593912890ad..09192c5c2ec 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -977,7 +977,7 @@ int wm_homefile_write_exec(bContext *C, wmOperator *op) int fileflags; /* check current window and close it if temp */ - if (win->screen->temp) + if (win && win->screen->temp) wm_window_close(C, wm, win); /* update keymaps in user preferences */ diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 79d0cd063d3..91790f7d8d5 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1957,7 +1957,6 @@ static void WM_OT_save_homefile(wmOperatorType *ot) ot->invoke = WM_operator_confirm; ot->exec = wm_homefile_write_exec; - ot->poll = WM_operator_winactive; } static int wm_userpref_autoexec_add_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) @@ -1974,7 +1973,6 @@ static void WM_OT_userpref_autoexec_path_add(wmOperatorType *ot) ot->description = "Add path to exclude from autoexecution"; ot->exec = wm_userpref_autoexec_add_exec; - ot->poll = WM_operator_winactive; ot->flag = OPTYPE_INTERNAL; } @@ -1996,7 +1994,6 @@ static void WM_OT_userpref_autoexec_path_remove(wmOperatorType *ot) ot->description = "Remove path to exclude from autoexecution"; ot->exec = wm_userpref_autoexec_remove_exec; - ot->poll = WM_operator_winactive; ot->flag = OPTYPE_INTERNAL; @@ -2011,7 +2008,6 @@ static void WM_OT_save_userpref(wmOperatorType *ot) ot->invoke = WM_operator_confirm; ot->exec = wm_userpref_write_exec; - ot->poll = WM_operator_winactive; } static void WM_OT_read_history(wmOperatorType *ot) @@ -2470,7 +2466,6 @@ static void WM_OT_recover_last_session(wmOperatorType *ot) ot->description = "Open the last closed file (\"" BLENDER_QUIT_FILE "\")"; ot->exec = wm_recover_last_session_exec; - ot->poll = WM_operator_winactive; } /* *************** recover auto save **************** */ @@ -2515,7 +2510,6 @@ static void WM_OT_recover_auto_save(wmOperatorType *ot) ot->exec = wm_recover_auto_save_exec; ot->invoke = wm_recover_auto_save_invoke; - ot->poll = WM_operator_winactive; WM_operator_properties_filesel(ot, BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_LONGDISPLAY); @@ -2743,7 +2737,6 @@ static void WM_OT_quit_blender(wmOperatorType *ot) ot->invoke = WM_operator_confirm; ot->exec = wm_exit_blender_exec; - ot->poll = WM_operator_winactive; } /* *********************** */ |