mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-19 15:03:05 +00:00
CAD: an armed face/edge pick must not lose its click to the body escalation
A card that asks for a face ("Click a solid FACE in the viewport") could not be
satisfied. Clicking the same sub-element twice deliberately escalates to the
whole body — right for free picking, wrong here: the user clicks the very face
the card is pointing at, the escalation turns it into a whole-body pick, and the
armed capture rejects it and leaves "(none)". Both orders failed, so a
face-based Coord Sys was reachable only by accident of ordering. That mattered
beyond the card: a mate needs a connector with an owning body, and a face or
edge pick is the only thing that sets one.
Adds DesignSketchTool::set_escalate_on_repick, off while the Plane, Axis or
CoordSys card has a pick armed and back on as soon as it is captured or
abandoned. While armed, clicking a face means "this face", which is what the
prompt already says.
Verified on the rig: arm Pick Face, click the face, and it reads "#5" on the
first click. With nothing armed the escalation still alternates whole <-> face
as before.
This commit is contained in:
@@ -3159,7 +3159,7 @@ bool DesignSketchTool::handle_solid_click(GLCanvas3D& canvas, const wxMouseEvent
|
||||
: m_solid_sel == SolidSel::Edge ? m_sel_edge == prev_edge
|
||||
: m_solid_sel == SolidSel::Face ? m_sel_face == prev_face
|
||||
: true);
|
||||
if (same_pick) {
|
||||
if (same_pick && m_escalate_repick) {
|
||||
select_body(m_sel_body); // clears face/edge/vertex, tints the whole body
|
||||
dp_pick_trace("re-pick -> escalated to whole body %d", m_sel_body);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user