Prevent refresh loops on GTK/MSW

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6787
This commit is contained in:
Jon Evans 2020-12-19 14:47:47 -05:00
parent 50fa1937f9
commit 281180512f
1 changed files with 4 additions and 1 deletions

View File

@ -264,7 +264,9 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
// This ensures that we will render often enough but not too often.
if( delta >= MinRefreshPeriod )
{
if( !m_pendingRefresh )
ForceRefresh();
m_refreshTimer.Start( MinRefreshPeriod, true );
}
else if( !m_refreshTimer.IsRunning() )
@ -278,6 +280,7 @@ void EDA_DRAW_PANEL_GAL::ForceRefresh()
{
//wxPaintEvent redrawEvent;
//wxPostEvent( this, redrawEvent );
m_pendingRefresh = true;
DoRePaint();
}