From 64e4f00f196e3e6e17e412b8c38454583e937cad Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 30 Dec 2024 17:07:31 +0500 Subject: [PATCH] Left mouse to cancel input mode in polyline tool Previously it would just have no effect, now it should be more natural. --- src/bonsai/bonsai/bim/module/model/polyline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/model/polyline.py b/src/bonsai/bonsai/bim/module/model/polyline.py index 4484a39eb7..1ba781fab9 100644 --- a/src/bonsai/bonsai/bim/module/model/polyline.py +++ b/src/bonsai/bonsai/bim/module/model/polyline.py @@ -317,7 +317,7 @@ class PolylineOperator: self, context: bpy.types.Context, event: bpy.types.Event ) -> Union[None, set[Literal["CANCELLED"]]]: if self.tool_state.is_input_on: - if event.value == "RELEASE" and event.type in {"ESC"}: + if event.value == "RELEASE" and event.type in {"ESC", "LEFTMOUSE"}: self.recalculate_inputs(context) self.tool_state.mode = "Mouse" self.tool_state.is_input_on = False