Fix: Free camera panning/rotating fixed (#12174)
Some checks are pending
Build all / Build Linux (push) Waiting to run
Build all / Build Non-Linux (push) Waiting to run
Build all / Unit Tests (push) Blocked by required conditions
Build all / Flatpak (push) Waiting to run

Fixes #10266
This commit is contained in:
Valerii Bokhan 2026-02-05 20:57:23 +01:00 committed by GitHub
parent 1a156e419c
commit 98cb91110e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4532,7 +4532,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
Vec3d orig = _mouse_to_3d(m_mouse.drag.start_position_2D, &z);
Camera& camera = wxGetApp().plater()->get_camera();
if (this->m_canvas_type != ECanvasType::CanvasAssembleView) {
if (wxGetApp().app_config->get_bool("use_free_camera"))
// Orca: Use a constrained camera when navigating the 3D scene with a regular mouse, if the free camera is not selected
if (!wxGetApp().app_config->get_bool("use_free_camera"))
// Forces camera right vector to be parallel to XY plane in case it has been misaligned using the 3D mouse free rotation.
// It is cheaper to call this function right away instead of testing wxGetApp().plater()->get_mouse3d_controller().connected(),
// which checks an atomics (flushes CPU caches).