Don't paint GAL canvas when it isn't shown.

Fixes: lp:1790502
* https://bugs.launchpad.net/kicad/+bug/1790502
This commit is contained in:
Jeff Young 2018-09-03 18:16:17 +01:00
parent c5330ac0bf
commit 8390b7a7ac
1 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,8 @@ void SCH_PREVIEW_PANEL::onPaint( wxPaintEvent& aEvent )
{
if( m_painter )
static_cast<KIGFX::SCH_PAINTER*>(m_painter.get())->GetSettings()->ImportLegacyColors( nullptr );
EDA_DRAW_PANEL_GAL::onPaint( aEvent );
if( IsShown() )
EDA_DRAW_PANEL_GAL::onPaint( aEvent );
}