From dbc9130da930ea5bbcac4f2df3092e9770621c6e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 12 Oct 2018 13:41:44 +0200 Subject: [PATCH] Fix: 3D footprint preview does not zoom using mouse wheel (Windows specific) This was due to clicking on the preview canvas does dot give the focus to the canvas on Windows. Now the focus is set when clicking on this canvas. Fixes: lp:1794090 https://bugs.launchpad.net/kicad/+bug/1794090 --- 3d-viewer/3d_canvas/eda_3d_canvas.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/3d-viewer/3d_canvas/eda_3d_canvas.cpp b/3d-viewer/3d_canvas/eda_3d_canvas.cpp index 26c7fb4222..3f4042aaf3 100644 --- a/3d-viewer/3d_canvas/eda_3d_canvas.cpp +++ b/3d-viewer/3d_canvas/eda_3d_canvas.cpp @@ -508,6 +508,8 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent &event ) #if wxCHECK_VERSION( 3, 1, 0 ) || defined( USE_OSX_MAGNIFY_EVENT ) void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event ) { + SetFocus(); + if( m_camera_is_moving ) return; @@ -555,6 +557,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event ) void EDA_3D_CANVAS::OnLeftDown( wxMouseEvent &event ) { + SetFocus(); stop_editingTimeOut_Timer(); } @@ -574,6 +577,7 @@ void EDA_3D_CANVAS::OnLeftUp( wxMouseEvent &event ) void EDA_3D_CANVAS::OnMiddleDown( wxMouseEvent &event ) { + SetFocus(); stop_editingTimeOut_Timer(); } @@ -599,6 +603,8 @@ void EDA_3D_CANVAS::OnRightClick( wxMouseEvent &event ) { wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnRightClick" ) ); + SetFocus(); + if( m_camera_is_moving ) return;