Skip to content

Commit 540c6a7

Browse files
Fix: Correcting the behavior of the camera panning.
Fixes SoftFever#11107
1 parent e922411 commit 540c6a7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/slic3r/GUI/GLCanvas3D.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4655,10 +4655,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
46554655
else if (is_camera_pan(evt, swap_mouse_buttons)) {
46564656
// if dragging with right button or if button functions swapped and dragging with left button over blank area then pan
46574657
if (m_mouse.is_start_position_2D_defined()) {
4658-
// get point in model space at Z = 0
4659-
float z = 0.0f;
4660-
const Vec3d& cur_pos = _mouse_to_3d(pos, &z);
4661-
Vec3d orig = _mouse_to_3d(m_mouse.drag.start_position_2D, &z);
4658+
const Vec3d& cur_pos = _mouse_to_3d(pos, nullptr);
4659+
Vec3d orig = _mouse_to_3d(m_mouse.drag.start_position_2D, nullptr);
46624660
Camera& camera = wxGetApp().plater()->get_camera();
46634661
if (this->m_canvas_type != ECanvasType::CanvasAssembleView) {
46644662
if (wxGetApp().app_config->get_bool("use_free_camera"))
@@ -4676,6 +4674,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
46764674

46774675
m_camera_movement = true;
46784676
m_mouse.drag.start_position_2D = pos;
4677+
m_mouse.drag.move_start_threshold_position_2D = pos;
46794678
}
46804679
}
46814680
else if ((evt.LeftUp() || evt.MiddleUp() || evt.RightUp()) ||

0 commit comments

Comments
 (0)