From d4ccc0dff94a4c16211b841d160530fbe80ebab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Thu, 12 Sep 2024 17:20:21 -0300 Subject: [PATCH] More fixes related to d5b20397a --- src/bonsai/bonsai/bim/module/model/decorator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/model/decorator.py b/src/bonsai/bonsai/bim/module/model/decorator.py index 9e4162aa34..641ad1d52a 100644 --- a/src/bonsai/bonsai/bim/module/model/decorator.py +++ b/src/bonsai/bonsai/bim/module/model/decorator.py @@ -415,14 +415,14 @@ class PolylineDecorator: new_line = 20 for i, (key, field_name) in enumerate(texts.items()): - if key != self.tool_state.input_type: + if self.tool_state and key != self.tool_state.input_type: formatted_value = self.input_ui.get_formatted_value(key) else: formatted_value = self.input_ui.get_text_value(key) if formatted_value is None: continue - if key == self.tool_state.input_type: + if self.tool_state and key == self.tool_state.input_type: blf.color(self.font_id, *color_highlight) else: blf.color(self.font_id, *color) @@ -493,7 +493,7 @@ class PolylineDecorator: default_container_elevation = tool.Ifc.get_object(tool.Root.get_default_container()).location.z projection_point = [] - if self.tool_state.use_default_container: + if self.tool_state and self.tool_state.use_default_container: # When a point is above the plane it projects the point # to the plane and creates a line if snap_prop.snap_type != "Plane" and snap_prop.z != 0: