Minimal cherry-pick of c836cc9cf8.

Fixes: lp:1839534
* https://bugs.launchpad.net/kicad/+bug/1839534
This commit is contained in:
Jeff Young 2019-08-10 22:26:39 +01:00
parent 300381ba4d
commit 3f91db25d4
3 changed files with 6 additions and 2 deletions

View File

@ -1410,7 +1410,6 @@ int EDIT_TOOL::MeasureTool( const TOOL_EVENT& aEvent )
void EDIT_TOOL::setTransitions()
{
Go( &EDIT_TOOL::Main, PCB_ACTIONS::editActivate.MakeEvent() );
Go( &EDIT_TOOL::Main, PCB_ACTIONS::move.MakeEvent() );
Go( &EDIT_TOOL::Drag, PCB_ACTIONS::drag45Degree.MakeEvent() );
Go( &EDIT_TOOL::Drag, PCB_ACTIONS::dragFreeAngle.MakeEvent() );

View File

@ -349,7 +349,7 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
if( selectionContains( evt->Position() ) )
{
// Yes -> run the move tool and wait till it finishes
m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" );
m_toolMgr->RunAction( PCB_ACTIONS::move, true );
}
else
{

View File

@ -193,6 +193,11 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, GR_DRAWMODE aDrawMode, const
}
TOOL_ACTION PCB_ACTIONS::move( "pcbnew.InteractiveEdit.move",
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_MOVE_ITEM ),
_( "Move" ), _( "Moves the selected item(s)" ), nullptr, AF_ACTIVATE );
// Initialize static member variables
wxString DIALOG_FIND::prevSearchString;
bool DIALOG_FIND::warpMouse = true;