mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
Design: port the Orca-widget rebuild and the mouse-press fix from snaporca
Mirrors snaporca-cad a016dffb48 + 4b828c4798 so the two forks do not drift:
- Sidebar on Orca's widget set: ComboBox for all 25 pickers, StaticBox
frames for the tool cards / feature tree / bodies list, framed double
spins, and no stack of full-width action buttons (Prepare's left panel
is parameters only).
- Toolbar: document group + undo/redo + mode-gated tools, commit far
right, ordered via keyed slots, at Prepare's 40 px / 4 px geometry.
- Polygon options and a new Move/Rotate card (distance, axis, angle) in
the sidebar instead of inline in the toolbar row.
- DesignSketchTool: stop consuming the LeftDown over a solid. Orca starts
a rotate drag on the press, so swallowing it killed orbit/pan whenever a
body was on screen. The pick now resolves on LeftUp within 4 px.
DesignSketchTool.{cpp,hpp} were byte-identical across the forks and are
copied verbatim. DesignPanel.cpp needed one hand-merge: mainline's
DropDown is Item-based (DropDown::Item{text,tip,icon}, DropDown(items&))
where snaporca passes parallel vectors, so feat_dropdown/ToolFlyout keep
the mainline form. Checked field-by-field against this fork's
Widgets/DropDown.hpp.
scripts/docker-iter-build.sh: mount the root CMakeLists.txt and cmake/
rather than inheriting the baked copies, which silently drops the
SLIC3R_CAD gate, and stop defaulting to snaporca's build volume - sharing
it made the two forks overwrite each other's cache and binary.
NOT COMPILED. This fork needs Eigen 5.0.1 (find_package(Eigen3 5.0.1
REQUIRED)) while the available snaporca-deps image supplies 3.3, so it
needs its own deps build to verify. The behaviour above was verified only
on the snaporca side.
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
f4469b8450
commit
b3e7d65cca
@@ -7641,7 +7641,21 @@ bool DesignSketchTool::on_mouse(wxMouseEvent& evt, GLCanvas3D& canvas)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!evt.LeftDown()) return false;
|
||||
// Click vs drag. Consuming the LeftDown here killed camera orbit/pan the moment a
|
||||
// solid was on screen: Orca starts a rotate drag on the press, so swallowing it meant
|
||||
// the canvas never began one. (A SpaceMouse kept working — it never goes through
|
||||
// wxMouseEvent.) Remember the press, let it fall through so the canvas can orbit, and
|
||||
// resolve the pick on release only if the pointer stayed put.
|
||||
if (evt.LeftDown()) {
|
||||
m_pick_press_x = evt.GetX();
|
||||
m_pick_press_y = evt.GetY();
|
||||
m_pick_pending = true;
|
||||
return false;
|
||||
}
|
||||
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)
|
||||
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
|
||||
// drawn ON a face can be selected and extruded/cut (Onshape engraving workflow).
|
||||
|
||||
Reference in New Issue
Block a user