Set DoubleBuffering to reduce flicker

This sets double buffering for GTK and MSW to minimize flicker when
redrawing window elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/4785
This commit is contained in:
Seth Hillbrand 2020-07-10 09:28:03 -07:00
parent 2675f69479
commit 106259f6e6
4 changed files with 6 additions and 0 deletions

View File

@ -197,6 +197,8 @@ void SCH_DRAW_PANEL::OnShow()
if( frame )
frame->ActivateGalCanvas();
}
m_parent->SetDoubleBuffered( true );
}

View File

@ -87,6 +87,8 @@ SCH_PREVIEW_PANEL::~SCH_PREVIEW_PANEL()
void SCH_PREVIEW_PANEL::OnShow()
{
m_parent->SetDoubleBuffered( true );
//m_view->RecacheAllItems();
}

View File

@ -100,6 +100,7 @@ void GERBVIEW_DRAW_PANEL_GAL::OnShow()
if( frame )
{
m_parent->SetDoubleBuffered( true );
SetTopLayer( frame->GetActiveLayer() );
auto& displ_opts = frame->GetDisplayOptions();
static_cast<KIGFX::GERBVIEW_RENDER_SETTINGS*>(

View File

@ -416,6 +416,7 @@ void PCB_DRAW_PANEL_GAL::OnShow()
if( frame )
{
m_parent->SetDoubleBuffered( true );
SetTopLayer( frame->GetActiveLayer() );
KIGFX::PAINTER* painter = m_view->GetPainter();
auto settings = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( painter->GetSettings() );