From cfff3832dc8982cc8e4964694faeb228c86b8a03 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 8 Jan 2019 10:06:10 +0100 Subject: [PATCH] Force SetFocus on 3D view when mouse enters it also on Mac --- src/slic3r/GUI/GLCanvas3D.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index f2de33bb7..a6d0f4e9d 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -4945,8 +4945,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) if (evt.Entering()) { -#if defined(__WXMSW__) || defined(__linux__) - // On Windows and Linux needs focus in order to catch key events +//#if defined(__WXMSW__) || defined(__linux__) +// // On Windows and Linux needs focus in order to catch key events + // Set focus in order to remove it from sidebar fields if (m_canvas != nullptr) { // Only set focus, if the top level window of this canvas is active. auto p = dynamic_cast(evt.GetEventObject()); @@ -4958,7 +4959,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } m_mouse.set_start_position_2D_as_invalid(); -#endif +//#endif } else if (evt.Leaving()) {