Convert selection vector to EDA_ITEMS for base tool call

The base tool expects a generic EDA_ITEMS, but the existing vector
doesn't easily cast, so add a temporary one.
This commit is contained in:
Ian McInerney
2023-06-20 21:52:50 +01:00
parent f899d9676f
commit f14feafc6b
6 changed files with 24 additions and 8 deletions
+2 -1
View File
@@ -2229,7 +2229,8 @@ int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
// Select the new items
m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &new_items );
EDA_ITEMS nItems( new_items.begin(), new_items.end() );
m_toolMgr->RunAction<EDA_ITEMS*>( PCB_ACTIONS::selectItems, true, &nItems );
// record the new items as added
if( !selection.Empty() )