diff --git a/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp b/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp index 70da7469e8..4754c9c6ed 100644 --- a/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp +++ b/gerbview/dialogs/gerbview_dialog_display_options_frame.cpp @@ -190,7 +190,6 @@ void DIALOG_DISPLAY_OPTIONS::OnOKBUttonClick( wxCommandEvent& event ) auto painter = static_cast( view->GetPainter() ); auto settings = static_cast( painter->GetSettings() ); settings->LoadDisplayOptions( displayOptions ); - view->RecacheAllItems(); view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); m_Parent->GetCanvas()->Refresh(); diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index 1cfb594637..fac8e99b73 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -324,7 +324,7 @@ void GERBVIEW_FRAME::OnSelectHighlightChoice( wxCommandEvent& event ) } - GetGalCanvas()->GetView()->RecacheAllItems(); + GetGalCanvas()->GetView()->UpdateAllItems( KIGFX::COLOR ); GetGalCanvas()->Refresh(); } else diff --git a/gerbview/gerbview_layer_widget.cpp b/gerbview/gerbview_layer_widget.cpp index 7373a82503..e5e037785c 100644 --- a/gerbview/gerbview_layer_widget.cpp +++ b/gerbview/gerbview_layer_widget.cpp @@ -336,9 +336,9 @@ void GERBER_LAYER_WIDGET::OnRenderColorChange( int aId, COLOR4D aColor ) auto view = galCanvas->GetView(); view->GetPainter()->GetSettings()->ImportLegacyColors( myframe->m_colorsSettings ); view->UpdateLayerColor( aId ); - // TODO(JE) Why are the below two lines needed? Not needed in pcbnew + view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); - view->RecacheAllItems(); + view->UpdateAllItems( KIGFX::COLOR ); } if( galCanvas && myframe->IsGalCanvasActive() ) @@ -359,8 +359,6 @@ void GERBER_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) { galCanvas->GetGAL()->SetGridVisibility( myframe->IsGridVisible() ); galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); - // TODO(JE) Why is the below line needed? Not needed in pcbnew - galCanvas->GetView()->RecacheAllItems(); } else galCanvas->GetView()->SetLayerVisible( aId, isEnabled );