diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 3f6c7e9f5c..5720aa2859 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1553,7 +1553,9 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) // Clear the current selection then select the drawings so that edit tools work on them m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); - m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &selectedItems ); + + EDA_ITEMS selItems( selectedItems.begin(), selectedItems.end() ); + m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &selItems ); m_frame->PushTool( aEvent ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 0225696633..dbd77b3d85 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -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( PCB_ACTIONS::selectItems, true, &nItems ); // record the new items as added if( !selection.Empty() ) diff --git a/pcbnew/tools/edit_tool_move_fct.cpp b/pcbnew/tools/edit_tool_move_fct.cpp index 9b22bbcd9c..3a0bf8a8ae 100644 --- a/pcbnew/tools/edit_tool_move_fct.cpp +++ b/pcbnew/tools/edit_tool_move_fct.cpp @@ -816,7 +816,9 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, const wxString& aCommi else { m_commit->Push( aCommitMessage ); - m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &orig_items ); + + EDA_ITEMS oItems( orig_items.begin(), orig_items.end() ); + m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &oItems ); } m_toolMgr->GetTool()->UpdateStatusBar(); diff --git a/pcbnew/tools/group_tool.cpp b/pcbnew/tools/group_tool.cpp index aa7a1e03e4..2bd225f346 100644 --- a/pcbnew/tools/group_tool.cpp +++ b/pcbnew/tools/group_tool.cpp @@ -357,7 +357,8 @@ int GROUP_TOOL::Ungroup( const TOOL_EVENT& aEvent ) } } - m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &members ); + EDA_ITEMS mem( members.begin(), members.end() ); + m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &mem ); m_toolMgr->PostEvent( EVENTS::SelectedItemsModified ); m_frame->OnModify(); diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 895ecd8792..1bdc0ccc29 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -1152,7 +1152,8 @@ int PCB_CONTROL::placeBoardItems( std::vector& aItems, bool aIsNew, } // Select the items that should be selected - m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &itemsToSel ); + EDA_ITEMS toSel( itemsToSel.begin(), itemsToSel.end() ); + m_toolMgr->RunAction( PCB_ACTIONS::selectItems, true, &toSel ); // Reannotate duplicate footprints (make sense only in board editor ) if( aReannotateDuplicates && m_isBoardEditor ) diff --git a/pcbnew/widgets/search_handlers.cpp b/pcbnew/widgets/search_handlers.cpp index 12f626305f..605dd401e5 100644 --- a/pcbnew/widgets/search_handlers.cpp +++ b/pcbnew/widgets/search_handlers.cpp @@ -116,7 +116,10 @@ void FOOTPRINT_SEARCH_HANDLER::SelectItems( std::vector& aItemRows ) m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true ); if( selectedItems.size() ) - m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItems, true, &selectedItems ); + { + EDA_ITEMS selItems( selectedItems.begin(), selectedItems.end() ); + m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItems, true, &selItems ); + } m_frame->GetCanvas()->Refresh( false ); } @@ -202,7 +205,10 @@ void ZONE_SEARCH_HANDLER::SelectItems( std::vector& aItemRows ) m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true ); if( selectedItems.size() ) - m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItems, true, &selectedItems ); + { + EDA_ITEMS selItems( selectedItems.begin(), selectedItems.end() ); + m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItems, true, &selItems ); + } m_frame->GetCanvas()->Refresh( false ); } @@ -290,7 +296,10 @@ void TEXT_SEARCH_HANDLER::SelectItems( std::vector& aItemRows ) m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true ); if( selectedItems.size() ) - m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItems, true, &selectedItems ); + { + EDA_ITEMS selItems( selectedItems.begin(), selectedItems.end() ); + m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectItems, true, &selItems ); + } m_frame->GetCanvas()->Refresh( false ); }