UI: auto-run error could push buttons off the visible header

This commit is contained in:
Campbell Barton
2014-12-01 10:59:53 +01:00
parent e7de96f5eb
commit 4ad0d33d69

View File

@@ -57,12 +57,15 @@ class INFO_HT_header(Header):
row = layout.row(align=True)
if bpy.app.autoexec_fail is True and bpy.app.autoexec_fail_quiet is False:
row.label("Auto-run disabled: %s" % bpy.app.autoexec_fail_message, icon='ERROR')
row.label("Auto-run disabled", icon='ERROR')
if bpy.data.is_saved:
props = row.operator("wm.revert_mainfile", icon='SCREEN_BACK', text="Reload Trusted")
props.use_scripts = True
row.operator("script.autoexec_warn_clear", text="Ignore")
# include last so text doesn't push buttons out of the header
row.label(bpy.app.autoexec_fail_message)
return
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)