diff --git a/pcbnew/dialogs/panel_setup_formatting.cpp b/pcbnew/dialogs/panel_setup_formatting.cpp index 7a02e4ad58..78323f46de 100644 --- a/pcbnew/dialogs/panel_setup_formatting.cpp +++ b/pcbnew/dialogs/panel_setup_formatting.cpp @@ -71,8 +71,26 @@ bool PANEL_SETUP_FORMATTING::TransferDataFromWindow() view->GetPainter()->GetSettings()->SetDashLengthRatio( settings.GetDashedLineDashRatio() ); view->GetPainter()->GetSettings()->SetGapLengthRatio( settings.GetDashedLineGapRatio() ); - view->MarkDirty(); - view->UpdateAllItems( KIGFX::REPAINT ); + + view->UpdateAllItemsConditionally( KIGFX::REPAINT, [] ( KIGFX::VIEW_ITEM* aItem ) -> bool + { + + EDA_ITEM* item = dynamic_cast( aItem ); + + if( !item ) + return false; + + switch( item->Type() ) + { + case PCB_SHAPE_T: + case PCB_FP_SHAPE_T: + return true; + + default: + return false; + } + + } ); m_frame->GetCanvas()->Refresh(); return true;