Finish touchpad camera panning when Shift is released (#17846)

In Touchpad camera mode, releasing Shift after a pan or Alt after an orbit left the camera move active. The next right-click then skipped the menu and, since #17432, the object selection.

Finish the pan on Shift release and the orbit on Alt release. This replaces the Windows-only Alt release handling from #8249, which stopped the orbit but still left the next right-click ignored.

Fixes #17844
This commit is contained in:
Noisyfox authored and GitHub committed 2026-11-24 12:02:41 -06:00
1 parent 755af907c6
commit 39baf6d917
1 file changed
+6 -6
+6 -6
View File
@@ -5096,6 +5096,8 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
m_mouse.ignore_left_up = true;
m_dirty = true;
}
else if (m_is_touchpad_navigation && m_mouse.drag.camera_pan_anchor.has_value())
mouse_up_cleanup();
// set_cursor(Standard);
}
else if (keyCode == WXK_ALT) {
@@ -5105,13 +5107,11 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
m_mouse.ignore_left_up = true;
m_dirty = true;
}
// Orbit stores its last pointer position in the 3D slot. A pan or a new button press sets the 2D slot.
else if (m_is_touchpad_navigation && m_camera_movement && m_mouse.is_start_position_3D_defined() &&
!m_mouse.is_start_position_2D_defined())
mouse_up_cleanup();
// set_cursor(Standard);
#ifdef __WXMSW__
if (m_camera_movement && m_is_touchpad_navigation) {
m_camera_movement = false;
m_mouse.set_start_position_3D_as_invalid();
}
#endif
}
else if (keyCode == WXK_CONTROL)
m_dirty = true;