Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-20 20:41:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-20 20:41:41 +0300
commita035dafd2732e2aae3ad61ca5ba8e8c1d9d4463c (patch)
tree3d6430f613c29862873931d560d0f8f418d1da5e
parent2ed547be4dbff959aaf2576bf077a957964e2b5f (diff)
fix for error with text ui when there is no text loaded.
-rw-r--r--release/scripts/ui/space_text.py6
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):