diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-10 06:05:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-10 06:05:38 +0400 |
commit | 0d699fb46a4c230c97440036b762e068c60afd05 (patch) | |
tree | 72b41bec86f34579c2be35da52a542a409f8ebe3 /release/scripts/startup/bl_ui | |
parent | 412c04347440fa5e480b69a07b20ff1399775c5b (diff) |
minor edit to previous commit, only show option to reload the file if its been saved.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_info.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 1885f115aa8..7487aaf420d 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -68,9 +68,11 @@ class INFO_HT_header(Header): if bpy.app.autoexec_fail is True and bpy.app.autoexec_fail_quiet is False: layout.operator_context = 'EXEC_DEFAULT' row.label("Script failed to auto-run", icon='ERROR') - props = row.operator("wm.open_mainfile", icon='SCREEN_BACK', text="Reload Trusted") - props.filepath = bpy.data.filepath - props.use_scripts = True + if bpy.data.is_saved: + props = row.operator("wm.open_mainfile", icon='SCREEN_BACK', text="Reload Trusted") + props.filepath = bpy.data.filepath + props.use_scripts = True + row.operator("script.autoexec_warn_clear", icon='CANCEL') row.label("Skipping: (%s)" % bpy.app.autoexec_fail_message) return |