From 273cdc6ea8ea795efcbc40ba7389a2316f8f6de6 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 16 May 2023 16:53:38 +0500 Subject: [PATCH] Fixed ifc text annotation preview not showing during edit #3159 Error was: ``` Traceback (most recent call last): File "\scripts\addons\blenderbim\bim\module\drawing\decoration.py", line 1899, in __call__ decorator.decorate(context, obj) File "\scripts\addons\blenderbim\bim\module\drawing\decoration.py", line 1451, in decorate self.draw_text(context, obj) File "\scripts\addons\blenderbim\bim\module\drawing\decoration.py", line 540, in draw_text symbol = text_data["Symbol"] KeyError: 'Symbol' ``` --- src/blenderbim/blenderbim/bim/module/drawing/decoration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/drawing/decoration.py b/src/blenderbim/blenderbim/bim/module/drawing/decoration.py index fce45b1195..81a28bf0da 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/decoration.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/decoration.py @@ -535,7 +535,9 @@ class BaseDecorator: pos = location_3d_to_region_2d(region, region3d, text_world_position) props = obj.BIMTextProperties - text_data = props.get_text_edited_data() if props.is_editing else DecoratorData.get_ifc_text_data(obj) + text_data = DecoratorData.get_ifc_text_data(obj) + if props.is_editing: + text_data = text_data | props.get_text_edited_data() literals_data = text_data["Literals"] symbol = text_data["Symbol"] text_scale = 1.0