From f99015e12334d1c130ca7aef535c53f32e0e460e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Thu, 13 Mar 2025 13:57:39 -0300 Subject: [PATCH] Polyline tool - move "remove_last_polyline_point" to "handle_inserting_polyline". --- src/bonsai/bonsai/bim/module/model/polyline.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/model/polyline.py b/src/bonsai/bonsai/bim/module/model/polyline.py index 5bc1613785..ed887440d7 100644 --- a/src/bonsai/bonsai/bim/module/model/polyline.py +++ b/src/bonsai/bonsai/bim/module/model/polyline.py @@ -842,6 +842,12 @@ class PolylineOperator: PolylineDecorator.update(event, self.tool_state, self.input_ui, self.snapping_points[0]) tool.Blender.update_viewport() + if not self.tool_state.is_input_on: + if event.value == "RELEASE" and event.type == "BACK_SPACE": + tool.Polyline.remove_last_polyline_point() + tool.Blender.update_viewport() + + def handle_snap_selection(self, context: bpy.types.Context, event: bpy.types.Event) -> None: if not self.tool_state.is_input_on and event.value == "PRESS" and event.type == "M": self.snapping_points = tool.Snap.modify_snapping_point_selection( @@ -909,10 +915,6 @@ class PolylineOperator: tool.Blender.update_viewport() return {"RUNNING_MODAL"} - if event.value == "RELEASE" and event.type == "BACK_SPACE": - tool.Polyline.remove_last_polyline_point() - tool.Blender.update_viewport() - def get_product_preview_data(self, context: bpy.types.Context, relating_type: ifcopenshell.entity_isntance): if tool.Model.get_usage_type(relating_type) == "PROFILE": if relating_type.is_a() in {"IfcColumnType", "IfcPileType"}: