Pcbnew tool: fix inconsistent selection after creation

If the point selection was used for the circualr array, one of the items
would be unselected, which is different to the grid array and annoying
if you want to pick up/edit props for the new items.
This commit is contained in:
John Beard
2025-01-16 19:43:15 +08:00
parent 6e7b22904e
commit ba5bdfaca6
+6
View File
@@ -287,6 +287,12 @@ void ARRAY_TOOL::onDialogClosed( wxCloseEvent& aEvent )
all_added_items.push_back( item );
}
// Make sure original items are selected (e.g. interactive point select may clear it)
for( int i = 0; i < m_selection->Size(); ++i )
{
all_added_items.push_back( selection[i] );
}
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear );
m_toolMgr->RunAction<EDA_ITEMS*>( PCB_ACTIONS::selectItems, &all_added_items );