Fix sticky camera rotate for touchpad navigation style on Windows (#8249)
* glcanvas: add modifiers to mouse events logging * glcanvas: workaround for touchpad nav on Win Releasing ALT on windows platform result in GLCanvas losing focus. Because of this mouse movements not being processed by on_mouse() event handler and camera rotation have not cleaned up. Make a workaround for Windows to cleanup camera rotate state on releasing ALT modifier.
This commit is contained in:
parent
00418626cb
commit
c0533eba6f
1 changed files with 12 additions and 0 deletions
|
@ -3519,6 +3519,12 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
|
|||
m_dirty = true;
|
||||
}
|
||||
// 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;
|
||||
|
@ -3873,6 +3879,12 @@ std::string format_mouse_event_debug_message(const wxMouseEvent &evt)
|
|||
out += "RightUp ";
|
||||
if (evt.RightDClick())
|
||||
out += "RightDClick ";
|
||||
if (evt.AltDown())
|
||||
out += "AltDown ";
|
||||
if (evt.ShiftDown())
|
||||
out += "ShiftDown ";
|
||||
if (evt.ControlDown())
|
||||
out += "ControlDown ";
|
||||
|
||||
sprintf(buf, "(%d, %d)", evt.GetX(), evt.GetY());
|
||||
out += buf;
|
||||
|
|
Loading…
Reference in a new issue