Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
authorGrigory Revzin <revzingg@gmail.com>
Tue, 1 Apr 2014 15:54:37 +0000 (17:54 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 1 Apr 2014 16:00:07 +0000 (18:00 +0200)
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440

release/scripts/startup/bl_ui/space_info.py
source/blender/windowmanager/intern/wm_operators.c

index 01692c9a5b768cb09b149519dd19a1f33a519c53..d02d1cb428fff46ae6d8519405f14434de0442bb 100644 (file)
@@ -124,7 +124,6 @@ class INFO_MT_file(Menu):
 
         layout.operator_context = 'INVOKE_AREA'
         layout.operator("wm.save_homefile", icon='SAVE_PREFS')
-        layout.operator_context = 'EXEC_AREA'
         layout.operator("wm.read_factory_settings", icon='LOAD_FACTORY')
 
         layout.separator()
index f0ee8318a5583a348bc0ce8231e2b537f8f605e1..06e08aaf939fb3adb4d5bfe034817b6bc0dae36a 100644 (file)
@@ -2371,6 +2371,7 @@ static void WM_OT_revert_mainfile(wmOperatorType *ot)
        ot->name = "Revert";
        ot->idname = "WM_OT_revert_mainfile";
        ot->description = "Reload the saved file";
+       ot->invoke = WM_operator_confirm;
 
        ot->exec = wm_revert_mainfile_exec;
        ot->poll = wm_revert_mainfile_poll;
@@ -2617,6 +2618,7 @@ static void WM_OT_recover_last_session(wmOperatorType *ot)
        ot->name = "Recover Last Session";
        ot->idname = "WM_OT_recover_last_session";
        ot->description = "Open the last closed file (\"" BLENDER_QUIT_FILE "\")";
+       ot->invoke = WM_operator_confirm;
        
        ot->exec = wm_recover_last_session_exec;
 }