forked from 1b-agent/opencadstudio-upstream
fix: NAVVCUBE and UCSICON commands now properly toggle visibility
NAVVCUBE: propagate show_viewcube flag through ViewportPane and the wgpu Primitive so the ViewCube pipeline skips upload/render when hidden. UCSICON: bare command (no subcommand) now toggles current state instead of printing usage info. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ec53a4730
commit
5f3182fa9a
4 files changed
+41
-16
No files matched your search
@@ -3700,6 +3700,20 @@ impl H7CAD {
|
||||
"UCSICON {sub}: updated {count} viewport(s) + model space."
|
||||
));
|
||||
}
|
||||
"" => {
|
||||
// Bare UCSICON toggles visibility.
|
||||
self.push_undo_snapshot(i, "UCSICON");
|
||||
let visible = !self.show_ucs_icon;
|
||||
self.show_ucs_icon = visible;
|
||||
for entity in self.tabs[i].scene.document.entities_mut() {
|
||||
if let acadrust::EntityType::Viewport(vp) = entity {
|
||||
vp.status.ucs_icon_visible = visible;
|
||||
}
|
||||
}
|
||||
self.tabs[i].dirty = true;
|
||||
let state = if visible { "ON" } else { "OFF" };
|
||||
self.command_line.push_output(&format!("UCSICON {state}"));
|
||||
}
|
||||
_ => {
|
||||
self.command_line.push_info("Usage: UCSICON ON | OFF | NOORIGIN | ORIGIN");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user