Prevent refresh loops on GTK/MSW
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6787
This commit is contained in:
parent
50fa1937f9
commit
281180512f
|
@ -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 )
|
||||
{
|
||||
ForceRefresh();
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue