3D viewer: Fix incorrect behavior when moving the scene

Fixes #12114
https://gitlab.com/kicad/code/kicad/issues/12114
This commit is contained in:
jean-pierre charras 2022-07-30 11:38:31 +02:00
parent 0f915bf8a0
commit 4bfbf91369
2 changed files with 6 additions and 2 deletions

View File

@ -617,14 +617,17 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
//wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnMouseMove" ) );
if( m_camera_is_moving )
return;
OnMouseMoveCamera( event );
if( m_mouse_was_moved )
{
DisplayStatus();
Request_refresh();
restart_editingTimeOut_Timer();
// *Do not* reactivate the timer here during the mouse move command:
// OnMiddleUp() will do it at the end of mouse drag/move command
}
if( !event.Dragging() && m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )

View File

@ -60,6 +60,7 @@ void HIDPI_GL_3D_CANVAS::OnMouseMoveCamera( wxMouseEvent& event )
m_mouse_is_moving = true;
m_mouse_was_moved = true;
}
m_camera.SetCurMousePosition( nativePosition );
}