diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 086bf4f5e2..165ed216f2 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -68,6 +68,7 @@ private: BOARD* m_brd; int* m_originalColWidths; PCB_SELECTION m_selection; + std::vector m_items_changed; // a list of modified items public: DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParent ); @@ -356,7 +357,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi m_parent->SetTrackSegmentWidth( aItem, aUndoList, true ); } - m_brd->OnItemChanged( aItem ); + m_items_changed.push_back( aItem ); } @@ -422,6 +423,12 @@ bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow() m_parent->GetCanvas()->GetView()->Update( track ); } + if( m_items_changed.size() ) + { + m_brd->OnItemsChanged( m_items_changed ); + m_parent->OnModify(); + } + return true; } diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index e270cee1dc..a0359c2a3f 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -76,8 +76,6 @@ void PCB_EDIT_FRAME::SetTrackSegmentWidth( PCB_TRACK* aTrackItem, if( initial_width != new_width || initial_drill != new_drill ) { - OnModify(); - if( aItemsListPicker ) { aTrackItem->SetWidth( initial_width );