From f4b0fe6560b9d7da170c1276008061ea14014600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Perdig=C3=A3o?= Date: Fri, 28 Feb 2025 13:52:20 -0300 Subject: [PATCH] Polyline tool - Fix issue where Y and Z axis lock were inverted when in YZ plane. --- src/bonsai/bonsai/tool/snap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bonsai/bonsai/tool/snap.py b/src/bonsai/bonsai/tool/snap.py index 0392acfad6..2d2b2ae08b 100644 --- a/src/bonsai/bonsai/tool/snap.py +++ b/src/bonsai/bonsai/tool/snap.py @@ -477,11 +477,11 @@ class Snap(bonsai.core.tool.Snap): if tool_state.plane_method: if tool_state.plane_method in {"XY", "XZ"} and tool_state.axis_method == "X": tool_state.snap_angle = 180 - if tool_state.plane_method in {"XY", "YZ"} and tool_state.axis_method == "Y": + if tool_state.plane_method in {"XY"} and tool_state.axis_method == "Y": tool_state.snap_angle = 90 - if tool_state.plane_method in {"YZ"} and tool_state.axis_method == "Z": + if tool_state.plane_method in {"YZ"} and tool_state.axis_method == "Y": tool_state.snap_angle = 180 - if tool_state.plane_method in {"XZ"} and tool_state.axis_method == "Z": + if tool_state.plane_method in {"XZ", "YZ"} and tool_state.axis_method == "Z": tool_state.snap_angle = 90 if tool_state.lock_axis or tool_state.axis_method: # Doesn't update snap_angle so that it keeps in the same axis