Use a single-shot timer for auto-panning.
Fixes https://gitlab.com/kicad/code/kicad/issues/11425
This commit is contained in:
parent
5e7c4b734c
commit
c5c5a3fe91
|
@ -580,6 +580,8 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent )
|
|||
m_view->SetCenter( m_view->GetCenter() + dir );
|
||||
|
||||
refreshMouse();
|
||||
|
||||
m_panTimer.Start();
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -907,7 +909,7 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent )
|
|||
if( borderHit )
|
||||
{
|
||||
setState( AUTO_PANNING );
|
||||
m_panTimer.Start( (int) ( 250.0 / 60.0 ) );
|
||||
m_panTimer.Start( (int) ( 250.0 / 60.0 ), true );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue