forked from 1b-agent/opencadstudio-upstream
fix(layers): VP glyph and filter-aware shift ranges
VP-freeze columns used the global-freeze glyph; shift-ranges swept filtered-out rows into bulk ops. Glyph swapped to layer_vp_freeze (ribbon precedent); new visible_indices helper shared by the view loop and the shift arm. Test: shift_select_skips_filtered_out_rows (RED: hidden row in range). Full suite: 2028 passed / 0 failed / 25 ignored.
This commit is contained in:
1 parent
ea7e79bfab
commit
6c3cfb55b5
3 files changed
+53
-8
No files matched your search
@@ -3590,10 +3590,14 @@ impl OpenCADStudio {
|
||||
panel.selected_multi.push(idx);
|
||||
}
|
||||
} else if shift {
|
||||
// Shift-click selects the range from the anchor to here.
|
||||
// Shift-click selects the range from the anchor to here —
|
||||
// visible rows only, so filtered-out rows between them
|
||||
// cannot join bulk edits/deletes (#50).
|
||||
let anchor = panel.selected.unwrap_or(idx);
|
||||
let (lo, hi) = (anchor.min(idx), anchor.max(idx));
|
||||
panel.selected_multi = (lo..=hi).collect();
|
||||
let visible: std::collections::HashSet<usize> =
|
||||
panel.visible_indices().into_iter().collect();
|
||||
panel.selected_multi = (lo..=hi).filter(|r| visible.contains(r)).collect();
|
||||
} else if !panel.selected_multi.contains(&idx) {
|
||||
// Plain click collapses to this row — but NOT when it is
|
||||
// already part of a multi-selection, so clicking a property
|
||||
|
||||
Reference in new issue
Block a user