Left mouse to cancel input mode in polyline tool

Previously it would just have no effect, now it should be more natural.
This commit is contained in:
Andrej730
2024-12-30 17:07:31 +05:00
parent 0f25701967
commit 64e4f00f19
@@ -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