mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Some fixes for 812e3dc6df
This commit is contained in:
@@ -321,6 +321,9 @@ class DecoratorData:
|
|||||||
# get symbol
|
# get symbol
|
||||||
symbol = tool.Drawing.get_annotation_symbol(element)
|
symbol = tool.Drawing.get_annotation_symbol(element)
|
||||||
|
|
||||||
|
# get newline_at
|
||||||
|
newline_at = pset_data['Newline_At']
|
||||||
|
|
||||||
# other attributes
|
# other attributes
|
||||||
props_literals = props.literals
|
props_literals = props.literals
|
||||||
props_literals_n = len(props.literals)
|
props_literals_n = len(props.literals)
|
||||||
@@ -338,7 +341,7 @@ class DecoratorData:
|
|||||||
|
|
||||||
literals_data.append(literal_data)
|
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
|
cls.data[obj.name] = text_data
|
||||||
return text_data
|
return text_data
|
||||||
|
|
||||||
|
|||||||
@@ -594,6 +594,7 @@ class BaseDecorator:
|
|||||||
text_data = text_data | props.get_text_edited_data()
|
text_data = text_data | props.get_text_edited_data()
|
||||||
literals_data = text_data["Literals"]
|
literals_data = text_data["Literals"]
|
||||||
symbol = text_data["Symbol"]
|
symbol = text_data["Symbol"]
|
||||||
|
newline_at = text_data["Newline_At"]
|
||||||
text_scale = 1.0
|
text_scale = 1.0
|
||||||
|
|
||||||
# draw asterisk symbol to indicate that there is some symbol that's not shown in viewport
|
# 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"]
|
box_alignment = literal_data["BoxAlignment"]
|
||||||
text = literal_data["CurrentValue"]
|
text = literal_data["CurrentValue"]
|
||||||
|
|
||||||
newline_at = props.newline_at
|
|
||||||
|
|
||||||
if newline_at != 0:
|
if newline_at != 0:
|
||||||
text = helper.add_newline_between_words (text, newline_at)
|
text = helper.add_newline_between_words (text, newline_at)
|
||||||
|
|
||||||
|
|||||||
@@ -536,6 +536,7 @@ class BIMTextProperties(PropertyGroup):
|
|||||||
text_data = {
|
text_data = {
|
||||||
"Literals": literals_data,
|
"Literals": literals_data,
|
||||||
"FontSize": float(self.font_size),
|
"FontSize": float(self.font_size),
|
||||||
|
"Newline_At": int(self.newline_at),
|
||||||
}
|
}
|
||||||
return text_data
|
return text_data
|
||||||
|
|
||||||
|
|||||||
@@ -578,7 +578,7 @@ class BIM_PT_text(Panel):
|
|||||||
row.label(text=str(text_data["FontSize"]))
|
row.label(text=str(text_data["FontSize"]))
|
||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
row.label(text="Newline_At")
|
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"]:
|
for literal_data in text_data["Literals"]:
|
||||||
box = self.layout.box()
|
box = self.layout.box()
|
||||||
|
|||||||
Reference in New Issue
Block a user