Improved the Quit Confirm behaviour: Now confirm only shows up when current session is dirty

This commit is contained in:
gaiaclary
2014-01-16 21:42:16 +01:00
parent 9cc5c157e8
commit 3110526bca

View File

@@ -83,7 +83,6 @@ class INFO_MT_file(Menu):
bl_label = "File" bl_label = "File"
def draw(self, context): def draw(self, context):
import sys
layout = self.layout layout = self.layout
layout.operator_context = 'INVOKE_AREA' layout.operator_context = 'INVOKE_AREA'
@@ -132,7 +131,7 @@ class INFO_MT_file(Menu):
layout.separator() layout.separator()
layout.operator_context = 'EXEC_AREA' layout.operator_context = 'EXEC_AREA'
if sys.platform == "darwin": if bpy.data.is_dirty:
layout.operator_context = 'INVOKE_SCREEN' # quit dialog layout.operator_context = 'INVOKE_SCREEN' # quit dialog
layout.operator("wm.quit_blender", text="Quit", icon='QUIT') layout.operator("wm.quit_blender", text="Quit", icon='QUIT')