Remove more unnecessary calls to RecacheAllItems
This commit is contained in:
parent
55edf1aad2
commit
449da4303e
|
@ -190,7 +190,6 @@ void DIALOG_DISPLAY_OPTIONS::OnOKBUttonClick( wxCommandEvent& event )
|
||||||
auto painter = static_cast<KIGFX::GERBVIEW_PAINTER*>( view->GetPainter() );
|
auto painter = static_cast<KIGFX::GERBVIEW_PAINTER*>( view->GetPainter() );
|
||||||
auto settings = static_cast<KIGFX::GERBVIEW_RENDER_SETTINGS*>( painter->GetSettings() );
|
auto settings = static_cast<KIGFX::GERBVIEW_RENDER_SETTINGS*>( painter->GetSettings() );
|
||||||
settings->LoadDisplayOptions( displayOptions );
|
settings->LoadDisplayOptions( displayOptions );
|
||||||
view->RecacheAllItems();
|
|
||||||
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
||||||
|
|
||||||
m_Parent->GetCanvas()->Refresh();
|
m_Parent->GetCanvas()->Refresh();
|
||||||
|
|
|
@ -324,7 +324,7 @@ void GERBVIEW_FRAME::OnSelectHighlightChoice( wxCommandEvent& event )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GetGalCanvas()->GetView()->RecacheAllItems();
|
GetGalCanvas()->GetView()->UpdateAllItems( KIGFX::COLOR );
|
||||||
GetGalCanvas()->Refresh();
|
GetGalCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -336,9 +336,9 @@ void GERBER_LAYER_WIDGET::OnRenderColorChange( int aId, COLOR4D aColor )
|
||||||
auto view = galCanvas->GetView();
|
auto view = galCanvas->GetView();
|
||||||
view->GetPainter()->GetSettings()->ImportLegacyColors( myframe->m_colorsSettings );
|
view->GetPainter()->GetSettings()->ImportLegacyColors( myframe->m_colorsSettings );
|
||||||
view->UpdateLayerColor( aId );
|
view->UpdateLayerColor( aId );
|
||||||
// TODO(JE) Why are the below two lines needed? Not needed in pcbnew
|
|
||||||
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
||||||
view->RecacheAllItems();
|
view->UpdateAllItems( KIGFX::COLOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( galCanvas && myframe->IsGalCanvasActive() )
|
if( galCanvas && myframe->IsGalCanvasActive() )
|
||||||
|
@ -359,8 +359,6 @@ void GERBER_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
|
||||||
{
|
{
|
||||||
galCanvas->GetGAL()->SetGridVisibility( myframe->IsGridVisible() );
|
galCanvas->GetGAL()->SetGridVisibility( myframe->IsGridVisible() );
|
||||||
galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
|
||||||
// TODO(JE) Why is the below line needed? Not needed in pcbnew
|
|
||||||
galCanvas->GetView()->RecacheAllItems();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
galCanvas->GetView()->SetLayerVisible( aId, isEnabled );
|
galCanvas->GetView()->SetLayerVisible( aId, isEnabled );
|
||||||
|
|
Loading…
Reference in New Issue