Reintroduce rotation limits for camera for FDM printers

This commit is contained in:
Enrico Turri 2020-02-10 12:36:52 +01:00
parent 519a982fe9
commit 0f5f2bc519
3 changed files with 42 additions and 8 deletions

View file

@ -3499,7 +3499,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
if (wxGetApp().plater()->get_mouse3d_controller().is_running() || (wxGetApp().app_config->get("use_free_camera") == "1"))
m_camera.rotate_local_around_target(Vec3d(y, x, 0.0));
else
m_camera.rotate_on_sphere(x, y);
m_camera.rotate_on_sphere(x, y, wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA);
#else
float sign = m_camera.inverted_phi ? -1.0f : 1.0f;
m_camera.phi += sign * ((float)pos(0) - (float)orig(0)) * TRACKBALLSIZE;