Set a selection reference point in get-and-move-module.

This will cause InteractiveEdit to move the reference point to
the cursor before waiting for mouse move events.

Fixes: lp:1571217
* https://bugs.launchpad.net/kicad/+bug/1571217
This commit is contained in:
Jeff Young 2018-01-21 20:54:53 +00:00 committed by Maciej Suminski
parent da305e7750
commit 8c4874866a
1 changed files with 4 additions and 0 deletions

View File

@ -1180,6 +1180,10 @@ int SELECTION_TOOL::findMove( const TOOL_EVENT& aEvent )
auto cursorPosition = viewCtrls->GetCursorPosition( false );
// Set a reference point so InteractiveEdit will move it to the
// cursor before waiting for mouse move events
m_selection.SetReferencePoint( module->GetPosition() );
// Place event on module origin first, so the generic anchor snap
// doesn't just choose the closest pin for us
viewCtrls->ForceCursorPosition( true, module->GetPosition() );