Update the zoom level as soon as it is modified by the mouse wheel

The zoom level displayed on the bottom of the canvas was not immediately
displayed, only after a mouse move.

Fixes #6542
https://gitlab.com/kicad/code/kicad/issues/6542
This commit is contained in:
jean-pierre charras 2020-11-29 17:46:07 +01:00
parent 9322b3a4e1
commit d3d26f2892
1 changed files with 4 additions and 0 deletions

View File

@ -253,6 +253,10 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
const VECTOR2D anchor = m_view->ToWorld( VECTOR2D( aEvent.GetX(), aEvent.GetY() ) ); const VECTOR2D anchor = m_view->ToWorld( VECTOR2D( aEvent.GetX(), aEvent.GetY() ) );
m_view->SetScale( m_view->GetScale() * zoomScale, anchor ); m_view->SetScale( m_view->GetScale() * zoomScale, anchor );
} }
// Refresh the zoom level and mouse position on message panel
// (mouse position has not changed, only the zoom level has changed):
refreshMouse();
} }
else else
{ {