From 024bf9dd847d96f15fa4844541be15f493559335 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Apr 2014 12:01:30 +0200 Subject: [PATCH] Fixed GAL canvas freeze when ordered twice to change to the same GAL canvas (e.g. double F11). --- common/draw_panel_gal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 67550dc3a8..a8c1dc0f67 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -194,14 +194,14 @@ void EDA_DRAW_PANEL_GAL::StopDrawing() 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; + // Prevent refreshing canvas during backend switch + m_pendingRefresh = true; + m_refreshTimer.Stop(); + delete m_gal; switch( aGalType )