feat(select): offer the selection modes at "Select objects"
Only Previous and Last were on offer, so Window, Crossing, Fence, the two polygons and All could not be reached at all -- and with no keyboard to type them into, the buttons were the only way in. Window and Crossing fix the sense of the next box. Dragging derives that from the direction the corner travels and would overwrite it the moment the corner moved, so the derivation stands down while a keyword holds it. Add and Remove decide what a pick does for the rest of the round: Remove subtracts the way Shift already does, rather than through PICKADD, which decides whether a pick *replaces* the set and so would have wiped everything gathered so far. Both are dropped when the next command starts, since neither outlives the selection that asked for them. Fence and the polygons are picked point by point, which TRIM and EXTEND already ask for. That gesture -- the points, the rubber-banded dashed preview, whether the path closes -- moves into one place both bind to, and the two preview builders duplicated in trim.rs go with it. A fence is not the polygon test with crossing set: that closes the point list and counts whatever lies inside, so a line drawn past a row of objects would take everything behind it too. It gets a hit test that only counts a real intersection, and skips the area-based geometry entirely. The lasso gathered its hits from wires, hatches, block hatches, meshes and block meshes inline; the new modes need the same list, and a second copy would drift. Both now come through `Scene::path_hit_handles`. Closes #596 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
22890a9411
commit
5c5c7606a1
12 changed files with 613 additions and 151 deletions
|
|
@ -68,6 +68,14 @@ impl OpenCADStudio {
|
|||
// Starting a command closes any open ribbon dropdown (e.g. a style
|
||||
// combo left open) so it does not stay stuck behind the new tool.
|
||||
self.ribbon.close_dropdown();
|
||||
// Selection keywords last only for the round that asked for them: a
|
||||
// Remove or a fixed Window sense must not quietly still be in force
|
||||
// when the next command asks for objects. (#596)
|
||||
self.select_remove_mode = false;
|
||||
{
|
||||
let mut selection = self.tabs[i].scene.selection.borrow_mut();
|
||||
selection.box_crossing_locked = false;
|
||||
}
|
||||
// Cancel any running command before starting a new one.
|
||||
if self.tabs[i].active_cmd.is_some() {
|
||||
self.tabs[i].scene.clear_preview_wire();
|
||||
|
|
|
|||
Loading…
Reference in a new issue