diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 22aee4f4bc..33412a5d4f 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -427,12 +427,6 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) { DIALOG_UPDATE_PCB updateDialog( this, &netlist ); updateDialog.ShowModal(); - - auto selectionTool = static_cast( - m_toolManager->FindTool( "pcbnew.InteractiveSelection" ) ); - - if( !selectionTool->GetSelection().Empty() ) - GetToolManager()->InvokeTool( "pcbnew.InteractiveEdit" ); } break; diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 4ce37c1170..eaf1646831 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -119,7 +120,11 @@ DIALOG_NETLIST::~DIALOG_NETLIST() m_config->Write( NETLIST_FILTER_MESSAGES_KEY, (long) m_MessageWindow->GetVisibleSeverities() ); if( m_runDragCommand ) - m_parent->GetToolManager()->InvokeTool( "pcbnew.InteractiveEdit" ); + { + KIGFX::VIEW_CONTROLS* controls = m_parent->GetGalCanvas()->GetViewControls(); + controls->SetCursorPosition( controls->GetMousePosition() ); + m_parent->GetToolManager()->RunAction( PCB_ACTIONS::move, true ); + } } diff --git a/pcbnew/dialogs/dialog_update_pcb.cpp b/pcbnew/dialogs/dialog_update_pcb.cpp index 8565207408..ef641abb49 100644 --- a/pcbnew/dialogs/dialog_update_pcb.cpp +++ b/pcbnew/dialogs/dialog_update_pcb.cpp @@ -94,7 +94,11 @@ DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB() m_config->Write( NETLIST_FILTER_MESSAGES_KEY, (long) m_messagePanel->GetVisibleSeverities() ); if( m_runDragCommand ) - m_frame->GetToolManager()->InvokeTool( "pcbnew.InteractiveEdit" ); + { + KIGFX::VIEW_CONTROLS* controls = m_frame->GetGalCanvas()->GetViewControls(); + controls->SetCursorPosition( controls->GetMousePosition() ); + m_frame->GetToolManager()->RunAction( PCB_ACTIONS::move, true ); + } } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 20f41607c9..83147499a3 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1289,7 +1289,7 @@ int SELECTION_TOOL::findMove( const TOOL_EVENT& aEvent ) viewCtrls->ForceCursorPosition( true, module->GetPosition() ); // pick the component up and start moving - m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" ); + m_toolMgr->RunAction( PCB_ACTIONS::move, true ); // restore the previous cursor position viewCtrls->SetCursorPosition( cursorPosition, false );