[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26147] trunk/blender/release/scripts/ui/ space_text.py: fix for error with text ui when there is no text loaded.
Campbell Barton
ideasman42 at gmail.com
Wed Jan 20 18:41:41 CET 2010
Revision: 26147
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26147
Author: campbellbarton
Date: 2010-01-20 18:41:41 +0100 (Wed, 20 Jan 2010)
Log Message:
-----------
fix for error with text ui when there is no text loaded.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_text.py
Modified: trunk/blender/release/scripts/ui/space_text.py
===================================================================
--- trunk/blender/release/scripts/ui/space_text.py 2010-01-20 17:02:24 UTC (rev 26146)
+++ trunk/blender/release/scripts/ui/space_text.py 2010-01-20 17:41:41 UTC (rev 26147)
@@ -78,7 +78,6 @@
layout = self.layout
st = context.space_data
- text = st.text
flow = layout.column_flow()
flow.prop(st, "line_numbers")
@@ -89,9 +88,12 @@
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):
bl_space_type = 'TEXT_EDITOR'
bl_region_type = 'UI'
More information about the Bf-blender-cvs
mailing list