From 1624320749a801eb62985fb6cd73e62c355a093b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 24 Sep 2013 16:00:21 +0200 Subject: [PATCH] Added protection from redrawing while GAL backend is being switched. --- common/drawpanel_gal.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 7087d1e86d..221e158f2c 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -188,6 +188,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) 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 if( aGalType == m_currentGal && m_gal != NULL ) return; @@ -225,6 +229,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) } m_currentGal = aGalType; + m_pendingRefresh = false; }