This commit is contained in:
Ryan Schultz
2024-11-18 22:55:31 -06:00
parent 362c5a17a7
commit 06d947f869
4 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -321,6 +321,9 @@ class DecoratorData:
# get symbol
symbol = tool.Drawing.get_annotation_symbol(element)
# get newline_at
newline_at = pset_data['Newline_At']
# other attributes
props_literals = props.literals
props_literals_n = len(props.literals)
@@ -338,7 +341,7 @@ class DecoratorData:
literals_data.append(literal_data)
text_data = {"Literals": literals_data, "FontSize": font_size, "Symbol": symbol}
text_data = {"Literals": literals_data, "FontSize": font_size, "Symbol": symbol, "Newline_At": newline_at}
cls.data[obj.name] = text_data
return text_data
@@ -594,6 +594,7 @@ class BaseDecorator:
text_data = text_data | props.get_text_edited_data()
literals_data = text_data["Literals"]
symbol = text_data["Symbol"]
newline_at = text_data["Newline_At"]
text_scale = 1.0
# draw asterisk symbol to indicate that there is some symbol that's not shown in viewport
@@ -607,8 +608,6 @@ class BaseDecorator:
box_alignment = literal_data["BoxAlignment"]
text = literal_data["CurrentValue"]
newline_at = props.newline_at
if newline_at != 0:
text = helper.add_newline_between_words (text, newline_at)
@@ -536,6 +536,7 @@ class BIMTextProperties(PropertyGroup):
text_data = {
"Literals": literals_data,
"FontSize": float(self.font_size),
"Newline_At": int(self.newline_at),
}
return text_data
+1 -1
View File
@@ -578,7 +578,7 @@ class BIM_PT_text(Panel):
row.label(text=str(text_data["FontSize"]))
row = self.layout.row(align=True)
row.label(text="Newline_At")
row.label(text=str(props.newline_at))
row.label(text=str(text_data["Newline_At"]))
for literal_data in text_data["Literals"]:
box = self.layout.box()