Feat: ZOOM IN/OUT/WINDOW commands; ZoomToWindow CmdResult

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-04-02 23:28:00 +03:00
commit 70a8f5bf3f
6 changed files with 120 additions and 0 deletions

View file

@ -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() {