diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index aa869c839d..4886378552 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -26,25 +26,21 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include -#include +#include +#include #include -#include #include #include #include #include #include -#include #define NETLIST_FILTER_MESSAGES_KEY wxT("NetlistReportFilterMsg") #define NETLIST_UPDATEFOOTPRINTS_KEY wxT("NetlistUpdateFootprints") @@ -106,7 +102,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->GetCanvas()->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 4bcd383974..a447a5333b 100644 --- a/pcbnew/dialogs/dialog_update_pcb.cpp +++ b/pcbnew/dialogs/dialog_update_pcb.cpp @@ -92,7 +92,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->GetCanvas()->GetViewControls(); + controls->SetCursorPosition( controls->GetMousePosition() ); + m_frame->GetToolManager()->RunAction( PCB_ACTIONS::move, true ); + } } diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index c042eb5bff..ddadc98449 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -393,11 +393,6 @@ int PCB_EDITOR_CONTROL::UpdatePCBFromSchematic( const TOOL_EVENT& aEvent ) { DIALOG_UPDATE_PCB updateDialog( m_frame, &netlist ); updateDialog.ShowModal(); - - SELECTION_TOOL* selectionTool = m_toolMgr->GetTool(); - - if( !selectionTool->GetSelection().Empty() ) - m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" ); } return 0; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 5bcff36bdd..60dfe6e787 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1129,7 +1129,7 @@ int SELECTION_TOOL::GetAndPlace( 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 );