Added protection from redrawing while GAL backend is being switched.
This commit is contained in:
parent
c4ad58f2a8
commit
1624320749
|
@ -188,6 +188,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect )
|
||||||
|
|
||||||
void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
|
void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
|
||||||
{
|
{
|
||||||
|
// Protect from refreshing during backend switch
|
||||||
|
m_pendingRefresh = true;
|
||||||
|
m_refreshTimer.Stop();
|
||||||
|
|
||||||
// Do not do anything if the currently used GAL is correct
|
// Do not do anything if the currently used GAL is correct
|
||||||
if( aGalType == m_currentGal && m_gal != NULL )
|
if( aGalType == m_currentGal && m_gal != NULL )
|
||||||
return;
|
return;
|
||||||
|
@ -225,6 +229,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_currentGal = aGalType;
|
m_currentGal = aGalType;
|
||||||
|
m_pendingRefresh = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue