Avoid repeated selection notifications when importing netlist

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16356
This commit is contained in:
Jon Evans 2023-12-23 17:41:23 -05:00
parent 63454d6da9
commit 4288c8dcaf
1 changed files with 3 additions and 2 deletions

View File

@ -128,8 +128,9 @@ void PCB_EDIT_FRAME::OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aR
// Start drag command for new footprints
if( !newFootprints.empty() )
{
for( FOOTPRINT* footprint : newFootprints )
GetToolManager()->RunAction<EDA_ITEM*>( PCB_ACTIONS::selectItem, footprint );
EDA_ITEMS items;
std::copy( newFootprints.begin(), newFootprints.end(), std::back_inserter( items ) );
GetToolManager()->RunAction<EDA_ITEMS*>( PCB_ACTIONS::selectItems, &items );
*aRunDragCommand = true;
}