Polyline tool - Fix issue where Y and Z axis lock were inverted when in YZ plane.

This commit is contained in:
Bruno Perdigão
2025-02-28 13:52:20 -03:00
parent efc6842a9d
commit f4b0fe6560
+3 -3
View File
@@ -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