Improved the Quit Confirm behaviour: Now confirm only shows up when current session is dirty
This commit is contained in:
parent
9cc5c157e8
commit
3110526bca
|
@ -83,7 +83,6 @@ class INFO_MT_file(Menu):
|
|||
bl_label = "File"
|
||||
|
||||
def draw(self, context):
|
||||
import sys
|
||||
layout = self.layout
|
||||
|
||||
layout.operator_context = 'INVOKE_AREA'
|
||||
|
@ -132,7 +131,7 @@ class INFO_MT_file(Menu):
|
|||
layout.separator()
|
||||
|
||||
layout.operator_context = 'EXEC_AREA'
|
||||
if sys.platform == "darwin":
|
||||
if bpy.data.is_dirty:
|
||||
layout.operator_context = 'INVOKE_SCREEN' # quit dialog
|
||||
layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
|
||||
|
||||
|
|
Loading…
Reference in New Issue