From 5feb4d3a7a6347862619c25b29ad8ad7f85f3360 Mon Sep 17 00:00:00 2001 From: PJM Date: Wed, 16 Sep 2020 18:49:56 -0700 Subject: [PATCH] Pcbnew: Check if user wants to warp mouse to origin of moved object CHANGED: When moving a footprint, Pcbnew was always warping the mouse to the origin of the moved object regardless of the state of the "Warp mouse to origin of moved object" checkbox. This MR now honors the state of the checkbox when moving footprints. Fixes https://gitlab.com/kicad/code/kicad/issues/5279 --- pcbnew/tools/edit_tool.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 3ac2c5d5af..5dcecf9614 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -544,6 +544,10 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference ) } else { + // Check if user wants to warp the mouse to origin of moved object + if( !editFrame->GetMoveWarpsCursor() ) + m_cursor = originalCursorPos; // No, so use original mouse pos instead + selection.SetReferencePoint( m_cursor ); grid.SetAuxAxes( true, m_cursor ); }