Removed outdated code from BIMTextProperties

This commit is contained in:
Andrej730
2023-03-16 09:47:51 +05:00
parent b55ac88c9d
commit 296cec02e8
@@ -416,16 +416,10 @@ class BIMTextProperties(PropertyGroup):
def get_box_alignment(self): def get_box_alignment(self):
return self.get("box_alignment", DEFAULT_BOX_ALIGNMENT) return self.get("box_alignment", DEFAULT_BOX_ALIGNMENT)
def refreshFontSize(self, context): def refresh_font_size(self, context):
# force update this object's font size for viewport display # force update this object's font size for viewport display
DecoratorData.data.pop(context.object.name, None) DecoratorData.data.pop(context.object.name, None)
# TODO: line seems outdated and currently is just throwing error. remove?
# File "\blenderbim\bim\module\drawing\annotation.py", line 63, in resize_text
# font_size *= float(text_obj.data.BIMTextProperties.font_size)
# AttributeError: 'NoneType' object has no attribute 'BIMTextProperties'
# annotation.Annotator.resize_text(context.active_object)
is_editing: BoolProperty(name="Is Editing", default=False) is_editing: BoolProperty(name="Is Editing", default=False)
attributes: CollectionProperty(name="Attributes", type=Attribute) attributes: CollectionProperty(name="Attributes", type=Attribute)
test_prop: StringProperty(name="test_prop", default="TEXT") test_prop: StringProperty(name="test_prop", default="TEXT")
@@ -439,7 +433,7 @@ class BIMTextProperties(PropertyGroup):
("7.0", "7.0 - Title", ""), ("7.0", "7.0 - Title", ""),
], ],
default="2.5", default="2.5",
update=refreshFontSize, update=refresh_font_size,
name="Font Size", name="Font Size",
) )
box_alignment: BoolVectorProperty( box_alignment: BoolVectorProperty(