fix for error with text ui when there is no text loaded.

This commit is contained in:
Campbell Barton
2010-01-20 17:41:41 +00:00
parent 2ed547be4d
commit a035dafd27

View File

@@ -78,7 +78,6 @@ class TEXT_PT_properties(bpy.types.Panel):
layout = self.layout
st = context.space_data
text = st.text
flow = layout.column_flow()
flow.prop(st, "line_numbers")
@@ -89,7 +88,10 @@ class TEXT_PT_properties(bpy.types.Panel):
flow = layout.column_flow()
flow.prop(st, "font_size")
flow.prop(st, "tab_width")
flow.prop(text, "tabs_as_spaces")
text = st.text
if text:
flow.prop(text, "tabs_as_spaces")
class TEXT_PT_find(bpy.types.Panel):