fix(view): preserve projection framing

Use full 3D bounds to derive a safe perspective eye distance without changing the camera target, orientation, or field of view.

Refs #502
This commit is contained in:
Hakan Seven committed 2026-08-05 12:47:46 +03:00
1 parent 5a0c286a10
commit e07f4f959b
5 files changed
+219 -19

No files matched your search

+3 -2
View File
@@ -1227,8 +1227,9 @@ impl OpenCADStudio {
Projection::Perspective
};
let i = self.active_tab;
self.tabs[i].scene.camera.borrow_mut().projection = proj;
self.tabs[i].scene.camera_generation += 1;
self.tabs[i]
.scene
.set_projection_preserving_frame(proj);
self.ribbon.set_ortho(ortho);
self.command_line.push_output(if ortho {
"Projection: Orthographic"