mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Some fixes for 812e3dc6df
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user