Give focus to 3D scene when activating any gizmo to allow related imgui dialogs to receive keyboard input

This commit is contained in:
enricoturri1966 2020-12-15 10:57:16 +01:00
parent 3f44f8177d
commit 82fe571cdc

View file

@ -3092,6 +3092,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
}
if (m_gizmos.on_mouse(evt)) {
if (wxWindow::FindFocus() != this->m_canvas)
// Grab keyboard focus for input in gizmo dialogs.
m_canvas->SetFocus();
if (evt.LeftUp() || evt.MiddleUp() || evt.RightUp())
mouse_up_cleanup();