forked from 1b-agent/opencadstudio-upstream
feat(statusbar): isolate / hide objects with status pill
Add a hidden-entity set to the scene that the tessellation visibility test skips, so hidden objects neither render nor hit-test. New commands ISOLATEOBJECTS (show only the selection), HIDEOBJECTS (hide the selection) and UNISOLATEOBJECTS (restore). An ISO status pill lights up while anything is hidden and restores everything on click. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
243a0bc923
commit
e0e7897952
5 files changed
+106
No files matched your search
@@ -59,6 +59,8 @@ impl StatusBar {
|
||||
insertion_units: i16,
|
||||
// True while the drawing-units picker is open.
|
||||
units_popup_open: bool,
|
||||
// True when objects are hidden by Isolate / Hide.
|
||||
isolation_active: bool,
|
||||
// Which pills the user has chosen to show on the bar.
|
||||
config: &'a StatusBarConfig,
|
||||
) -> Element<'a, Message> {
|
||||
@@ -173,6 +175,16 @@ impl StatusBar {
|
||||
"Drawing Units (INSUNITS)\nClick to change",
|
||||
));
|
||||
}
|
||||
if vis(StatusPill::Isolate) {
|
||||
right_status = right_status.push(tip(
|
||||
toggle_pill(
|
||||
"ISO",
|
||||
isolation_active,
|
||||
Message::Command("UNISOLATEOBJECTS".into()),
|
||||
),
|
||||
"Isolate Objects\nISOLATEOBJECTS / HIDEOBJECTS to hide; click to restore",
|
||||
));
|
||||
}
|
||||
if vis(StatusPill::Vp) && !vp_label.is_empty() {
|
||||
right_status = right_status.push(tip(
|
||||
status_pill(vp_label).into(),
|
||||
|
||||
@@ -23,6 +23,7 @@ pub enum StatusPill {
|
||||
Space,
|
||||
Scale,
|
||||
Units,
|
||||
Isolate,
|
||||
Vp,
|
||||
CleanScreen,
|
||||
}
|
||||
@@ -43,6 +44,7 @@ impl StatusPill {
|
||||
StatusPill::Space,
|
||||
StatusPill::Scale,
|
||||
StatusPill::Units,
|
||||
StatusPill::Isolate,
|
||||
StatusPill::Vp,
|
||||
StatusPill::CleanScreen,
|
||||
];
|
||||
@@ -62,6 +64,7 @@ impl StatusPill {
|
||||
StatusPill::Space => "space",
|
||||
StatusPill::Scale => "scale",
|
||||
StatusPill::Units => "units",
|
||||
StatusPill::Isolate => "isolate",
|
||||
StatusPill::Vp => "vp",
|
||||
StatusPill::CleanScreen => "cleanscreen",
|
||||
}
|
||||
@@ -82,6 +85,7 @@ impl StatusPill {
|
||||
StatusPill::Space => "Model/Paper Space",
|
||||
StatusPill::Scale => "Annotation Scale",
|
||||
StatusPill::Units => "Drawing Units",
|
||||
StatusPill::Isolate => "Isolate Objects",
|
||||
StatusPill::Vp => "Viewport Count",
|
||||
StatusPill::CleanScreen => "Clean Screen",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user