forked from 1b-agent/opencadstudio-upstream
feat(statusbar): selection cycling for overlapping objects (SC pill)
Add a click_hits_all hit-test and an SC pill that, when on, makes repeated clicks at the same spot step through the overlapping objects there (nearest first) instead of accumulating the selection. The whole cycling path is gated behind the toggle, so default picking is unchanged when it is off. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
f7eac09b55
commit
ac042c5dbf
6 files changed
+105
No files matched your search
@@ -67,6 +67,8 @@ impl StatusBar {
|
||||
quick_properties: bool,
|
||||
// True when the selection filter is excluding at least one type.
|
||||
selection_filter_active: bool,
|
||||
// Whether selection cycling is enabled.
|
||||
selection_cycling: bool,
|
||||
// Which pills the user has chosen to show on the bar.
|
||||
config: &'a StatusBarConfig,
|
||||
) -> Element<'a, Message> {
|
||||
@@ -213,6 +215,12 @@ impl StatusBar {
|
||||
"Selection Filtering\nLimit which object types can be picked",
|
||||
));
|
||||
}
|
||||
if vis(StatusPill::SelCycle) {
|
||||
right_status = right_status.push(tip(
|
||||
toggle_pill("SC", selection_cycling, Message::ToggleSelectionCycling),
|
||||
"Selection Cycling\nRepeat-click to step through overlapping objects",
|
||||
));
|
||||
}
|
||||
if vis(StatusPill::Vp) && !vp_label.is_empty() {
|
||||
right_status = right_status.push(tip(
|
||||
status_pill(vp_label).into(),
|
||||
|
||||
@@ -27,6 +27,7 @@ pub enum StatusPill {
|
||||
Isolate,
|
||||
QuickProps,
|
||||
SelFilter,
|
||||
SelCycle,
|
||||
Vp,
|
||||
CleanScreen,
|
||||
}
|
||||
@@ -51,6 +52,7 @@ impl StatusPill {
|
||||
StatusPill::Isolate,
|
||||
StatusPill::QuickProps,
|
||||
StatusPill::SelFilter,
|
||||
StatusPill::SelCycle,
|
||||
StatusPill::Vp,
|
||||
StatusPill::CleanScreen,
|
||||
];
|
||||
@@ -74,6 +76,7 @@ impl StatusPill {
|
||||
StatusPill::Isolate => "isolate",
|
||||
StatusPill::QuickProps => "quickprops",
|
||||
StatusPill::SelFilter => "selfilter",
|
||||
StatusPill::SelCycle => "selcycle",
|
||||
StatusPill::Vp => "vp",
|
||||
StatusPill::CleanScreen => "cleanscreen",
|
||||
}
|
||||
@@ -98,6 +101,7 @@ impl StatusPill {
|
||||
StatusPill::Isolate => "Isolate Objects",
|
||||
StatusPill::QuickProps => "Quick Properties",
|
||||
StatusPill::SelFilter => "Selection Filtering",
|
||||
StatusPill::SelCycle => "Selection Cycling",
|
||||
StatusPill::Vp => "Viewport Count",
|
||||
StatusPill::CleanScreen => "Clean Screen",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user