diff --git a/pcbnew/tools/edit_tool_move_fct.cpp b/pcbnew/tools/edit_tool_move_fct.cpp index f51eb92b59..c8b0e953c2 100644 --- a/pcbnew/tools/edit_tool_move_fct.cpp +++ b/pcbnew/tools/edit_tool_move_fct.cpp @@ -283,8 +283,6 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, const wxString& aCommi wxString status; size_t itemIdx = 0; - editFrame->PushTool( aEvent ); - // Be sure that there is at least one item that we can modify. If nothing was selected before, // try looking for the stuff under mouse cursor (i.e. KiCad old-style hover selection) PCB_SELECTION& selection = m_selectionTool->RequestSelection( @@ -298,10 +296,7 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, const wxString& aCommi !m_isFootprintEditor && cfg->m_AllowFreePads ); if( m_dragging || selection.Empty() ) - { - editFrame->PopTool( aEvent ); return 0; - } LSET item_layers = selection.GetSelectionLayers(); bool is_hover = selection.IsHover(); // N.B. This must be saved before the second call @@ -324,11 +319,12 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, const wxString& aCommi if( selection.Empty() ) { - editFrame->PopTool( aEvent ); return 0; } + editFrame->PushTool( aEvent ); Activate(); + // Must be done after Activate() so that it gets set into the correct context controls->ShowCursor( true ); controls->SetAutoPan( true );