forked from 1b-agent/opencadstudio-upstream
Feat: ZOOM IN/OUT/WINDOW commands; ZoomToWindow CmdResult
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
6f5c58612d
commit
70a8f5bf3f
6 files changed
+120
No files matched your search
@@ -356,6 +356,14 @@ impl H7CAD {
|
||||
self.command_line.push_info(&p);
|
||||
}
|
||||
}
|
||||
|
||||
CmdResult::ZoomToWindow { p1, p2 } => {
|
||||
self.tabs[i].active_cmd = None;
|
||||
self.tabs[i].snap_result = None;
|
||||
self.tabs[i].scene.clear_preview_wire();
|
||||
self.tabs[i].scene.zoom_to_window(p1, p2);
|
||||
self.command_line.push_output("Zoom Window");
|
||||
}
|
||||
}
|
||||
// Focus the command-line input while a command is active; blur it when the command ends.
|
||||
if self.tabs[i].active_cmd.is_some() {
|
||||
|
||||
@@ -710,6 +710,23 @@ impl H7CAD {
|
||||
self.command_line.push_output("Zoom Extents");
|
||||
}
|
||||
|
||||
"ZOOM IN"|"ZI" => {
|
||||
self.tabs[i].scene.zoom_camera(1.0 / 1.5);
|
||||
self.command_line.push_output("Zoom In");
|
||||
}
|
||||
|
||||
"ZOOM OUT"|"ZO" => {
|
||||
self.tabs[i].scene.zoom_camera(1.5);
|
||||
self.command_line.push_output("Zoom Out");
|
||||
}
|
||||
|
||||
"ZOOM WINDOW"|"ZOOM W"|"ZW" => {
|
||||
use crate::modules::view::zoom_window::ZoomWindowCommand;
|
||||
let new_cmd = ZoomWindowCommand::new();
|
||||
self.command_line.push_info(&new_cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(new_cmd));
|
||||
}
|
||||
|
||||
"STRETCH"|"SS" => {
|
||||
let handles: Vec<_> = self.tabs[i].scene.selected_entities()
|
||||
.into_iter().map(|(h, _)| h).collect();
|
||||
|
||||
Reference in new issue
Block a user