diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-20 20:41:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-20 20:41:41 +0300 |
commit | a035dafd2732e2aae3ad61ca5ba8e8c1d9d4463c (patch) | |
tree | 3d6430f613c29862873931d560d0f8f418d1da5e | |
parent | 2ed547be4dbff959aaf2576bf077a957964e2b5f (diff) |
fix for error with text ui when there is no text loaded.
-rw-r--r-- | release/scripts/ui/space_text.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/ui/space_text.py b/release/scripts/ui/space_text.py index 9ec723b51f1..64bcd67f59f 100644 --- a/release/scripts/ui/space_text.py +++ b/release/scripts/ui/space_text.py @@ -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): |