[Bf-blender-cvs] [420da87] master: Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.

Grigory Revzin noreply at git.blender.org
Tue Apr 1 18:00:38 CEST 2014


Commit: 420da872a65596920bbf04b15a1bb246c9a523f3
Author: Grigory Revzin
Date:   Tue Apr 1 17:54:37 2014 +0200
https://developer.blender.org/rB420da872a65596920bbf04b15a1bb246c9a523f3

Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.

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

===================================================================

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

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 01692c9..d02d1cb 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -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()
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index f0ee831..06e08aa 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -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;
 }




More information about the Bf-blender-cvs mailing list