Prevent refresh loops on GTK/MSW

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6787

(cherry picked from commit 281180512f)
This commit is contained in:
Jon Evans 2020-12-19 14:47:47 -05:00
parent 93173fca93
commit be5102a6e0
1 changed files with 4 additions and 1 deletions

View File

@ -295,7 +295,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() )
@ -309,6 +311,7 @@ void EDA_DRAW_PANEL_GAL::ForceRefresh()
{
//wxPaintEvent redrawEvent;
//wxPostEvent( this, redrawEvent );
m_pendingRefresh = true;
DoRePaint();
}