From 1545fb794673309dfd2614a3d9bb9d6acddd3214 Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Fri, 14 Aug 2026 12:45:25 +0200 Subject: [PATCH] CAD: an armed Plane or Axis pick captures the face, instead of escalating to the body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking a face that already happened to be selected, while a Plane or Axis pick was armed, read as a repeat pick: the click escalated to "whole body", the capture was lost, and the card's label stayed "(none)" with nothing on screen to explain it. On a cube it is easy to hit — the face under the cursor is often the one already selected from the previous step. The capture path in on_solid_picked already restores the flag for all three tools, and reset_plane_refs()/reset_axis_refs() restore it when a pick is abandoned — both were written as if the arm side disabled escalation. Only CoordSys actually did (that was snaporca-u0wd). Plane and Axis never had it. Verified on the rig: Midplane on a 60 mm cube now captures Face A (#5, top) and Face B (#3, side) on the FIRST click each, and the resulting plane renders as the 45-degree bisector between them, which is what a midplane of two perpendicular faces should be. Before this, the first pick escalated to the body and Face A stayed "(none)". Co-Authored-By: Claude Opus 5 (1M context) --- src/slic3r/GUI/DesignPanel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/DesignPanel.cpp b/src/slic3r/GUI/DesignPanel.cpp index 460597ff95..f0e30cf601 100644 --- a/src/slic3r/GUI/DesignPanel.cpp +++ b/src/slic3r/GUI/DesignPanel.cpp @@ -5893,6 +5893,12 @@ void DesignPanel::reset_plane_refs() void DesignPanel::arm_plane_pick(PlanePick target) { m_plane_pick = target; + // While a pick is armed, a click must CAPTURE the face under the cursor, never escalate to + // the whole body. Without this, clicking a face that already happens to be selected reads as + // a repeat pick, selects the body, and the capture is silently lost — the label stays + // "(none)" and the user has no idea why. The capture path below already restores the flag, + // and reset_plane_refs() restores it when the pick is abandoned; only the arm side was missing. + if (m_viewport) m_viewport->set_escalate_on_repick(false); const bool face = (target == PlanePick::FaceA || target == PlanePick::FaceB); m_status->SetForegroundColour(wxNullColour); set_status(face ? _L("Click a solid FACE in the viewport") @@ -5933,6 +5939,7 @@ void DesignPanel::reset_axis_refs() void DesignPanel::arm_axis_pick(AxisPick target) { m_axis_pick = target; + if (m_viewport) m_viewport->set_escalate_on_repick(false); // same as arm_plane_pick m_status->SetForegroundColour(wxNullColour); set_status(target == AxisPick::Face ? _L("Click a solid FACE in the viewport") : _L("Click a solid EDGE in the viewport"));