mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 14:32:36 +00:00
CAD: an armed Plane or Axis pick captures the face, instead of escalating to the body
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) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f6f2edb906
commit
1545fb7946
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user