mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-18 14:32:36 +00:00
Design: widen the solid-pick click threshold, and report what got picked
Ports snaporca-cad f5c7e74e9b. The LeftUp pick discarded anything moving more than 4 px total since the press. A hand-held mouse drifts that much during an ordinary click, so real clicks were thrown away as drags and it read as "selection does not work". Use 8 px per axis, GTK's own drag threshold. Also report the pick on the status line (body / face / edge). A solid pick previously set no text at all, so its only feedback was the viewport highlight, and a pick that registers but draws faintly looked identical to one that never fired. DesignSketchTool.cpp copied verbatim (identical between the forks apart from this change). DesignPanel.cpp took the status hunk only, since this fork keeps mainline's Item-based DropDown in feat_dropdown/ToolFlyout. Not confirmed on hardware yet, on either fork; this fork remains uncompiled (needs Eigen 5.0.1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVzKmX6Y1aEteit1HTXG4Q
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
7858cd6b6a
commit
edb1adbfa3
@@ -2107,6 +2107,22 @@ DesignPanel::DesignPanel(wxWindow* parent)
|
||||
// makes Extrude build a DETACHED new body from the last sketch instead of push/pulling
|
||||
// the face the user just clicked.
|
||||
if (level >= 1) { m_sel_sketch_region = -1; m_sel_sketch_feat = -1; }
|
||||
// Say what got picked. Without this the ONLY feedback is the viewport highlight, so a
|
||||
// pick that registers but draws faintly is indistinguishable from one that never
|
||||
// happened — which is precisely how this failure was reported and why it resisted
|
||||
// diagnosis. Cards that show their own labels still do.
|
||||
if (m_status != nullptr) {
|
||||
m_status->SetForegroundColour(wxNullColour);
|
||||
if (level <= 0)
|
||||
m_status->SetLabel(_L("Selection cleared"));
|
||||
else if (level == 1)
|
||||
m_status->SetLabel(wxString::Format(_L("Body %d selected — click again for a face"), body + 1));
|
||||
else if (level == 2)
|
||||
m_status->SetLabel(wxString::Format(_L("Body %d, face %d — click again for an edge"), body + 1, face));
|
||||
else
|
||||
m_status->SetLabel(wxString::Format(_L("Body %d, edge %d selected"), body + 1, edge));
|
||||
m_status->Refresh();
|
||||
}
|
||||
// If the Fillet/Chamfer card is open, re-anchor (or drop) the radius arrow on the new pick
|
||||
// and rebuild the ghost — once an edge is picked the preview-only mode hides the base body.
|
||||
if (m_active == Tool::Dressup) { update_fillet_gizmo(); refresh_preview(); }
|
||||
|
||||
@@ -7659,7 +7659,12 @@ bool DesignSketchTool::on_mouse(wxMouseEvent& evt, GLCanvas3D& canvas)
|
||||
}
|
||||
if (!(evt.LeftUp() && m_pick_pending)) return false;
|
||||
m_pick_pending = false;
|
||||
if (std::abs(evt.GetX() - m_pick_press_x) + std::abs(evt.GetY() - m_pick_press_y) > 4)
|
||||
// Threshold per axis, at GTK's own drag threshold. A hand-held mouse drifts several
|
||||
// pixels during an ordinary click — a tight budget silently swallowed real clicks and
|
||||
// looked exactly like "selection does not work". Synthetic clicks never drift, which
|
||||
// is why the headless rig could not show this.
|
||||
if (std::max(std::abs(evt.GetX() - m_pick_press_x),
|
||||
std::abs(evt.GetY() - m_pick_press_y)) > 8)
|
||||
return false; // it was a drag: the canvas already orbited, don't also select
|
||||
// Committed-sketch loop pick is computed FIRST. A click that lands on a loop's
|
||||
// STROKE (edge) selects that loop even when it lies on a solid face — so a sketch
|
||||
|
||||
Reference in New Issue
Block a user