forked from 1b-agent/opencadstudio-upstream
Selection: count duplicates and removals from the step's own picks
The count line now uses the objects the selection step itself picked (a click, a window or crossing, a lasso, a fence, Last / Previous / All): "N found (D duplicate), M total" when some were chosen already, "N found, R removed, M total" in remove mode, "N found, M total" when a removal picks objects that were not chosen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1e93b16911
commit
b9fd0a066c
27 files changed
+71
-12
No files matched your search
@@ -5215,6 +5215,10 @@ properties={:.1}ms picked={}",
|
||||
// lasso adds, Shift+lasso removes. An empty lasso
|
||||
// leaves the current selection untouched so a stray
|
||||
// drag never discards hard-won picks.
|
||||
if is_gathering {
|
||||
self.last_pick =
|
||||
Some((handles.clone(), self.shift_down || self.select_remove_mode));
|
||||
}
|
||||
if self.shift_down || self.select_remove_mode {
|
||||
self.tabs[i].scene.deselect_entities(&handles);
|
||||
} else {
|
||||
@@ -5356,6 +5360,12 @@ properties={:.1}ms picked={}",
|
||||
let hit =
|
||||
hit.filter(|&h| self.tabs[i].scene.passes_selection_filter(h));
|
||||
if let Some(handle) = hit {
|
||||
if is_gathering {
|
||||
self.last_pick = Some((
|
||||
vec![handle],
|
||||
self.shift_down || self.select_remove_mode,
|
||||
));
|
||||
}
|
||||
// Individual picks accumulate (issue #47):
|
||||
// each plain click adds to the selection,
|
||||
// Shift+click removes the picked entity.
|
||||
@@ -5488,6 +5498,10 @@ was_selected={}",
|
||||
// entities. An empty box leaves the selection alone
|
||||
// so an accidental empty drag never discards it.
|
||||
// PICKADD 0 (#226): a plain box REPLACES instead.
|
||||
if is_gathering {
|
||||
self.last_pick =
|
||||
Some((handles.clone(), self.shift_down || self.select_remove_mode));
|
||||
}
|
||||
if self.shift_down || self.select_remove_mode {
|
||||
self.tabs[i].scene.deselect_entities(&handles);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user