From 8c4874866ab6bd5a52ea28f7249906def90fef06 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 21 Jan 2018 20:54:53 +0000 Subject: [PATCH] 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 --- pcbnew/tools/selection_tool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d450bfd11b..b3964b03ca 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -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() );