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>2019-10-09 05:53:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-09 05:55:09 +0300
commitd77afcffa3971d5199541e2366571973c63237ed (patch)
tree9e5cabd2ec165715fdf780af317de29af4b0aebf /release/scripts
parent8f210f04758f1c81b757eca0e707f60267de0f19 (diff)
UI: hide text character options when out of edit-mode
These are overwritten when entering edit-mode so there is no use in showing them in object mode. Addresses T70566
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curve.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index b589f780c24..b7c566f23da 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -332,7 +332,8 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
layout = self.layout
text = context.curve
- char = context.curve.edit_format
+ char = text.edit_format
+ mode = context.mode
row = layout.split(factor=0.25)
row.label(text="Regular")
@@ -347,13 +348,15 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
row.label(text="Bold & Italic")
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
- layout.separator()
- row = layout.row(align=True)
- row.prop(char, "use_bold", toggle=True)
- row.prop(char, "use_italic", toggle=True)
- row.prop(char, "use_underline", toggle=True)
- row.prop(char, "use_small_caps", toggle=True)
+ if mode == 'EDIT_TEXT':
+ layout.separator()
+
+ row = layout.row(align=True)
+ row.prop(char, "use_bold", toggle=True)
+ row.prop(char, "use_italic", toggle=True)
+ row.prop(char, "use_underline", toggle=True)
+ row.prop(char, "use_small_caps", toggle=True)
class DATA_PT_font_transform(CurveButtonsPanelText, Panel):