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
This commit is contained in:
PJM 2020-09-16 18:49:56 -07:00 committed by Seth Hillbrand
parent 81b523f9a4
commit 5feb4d3a7a
1 changed files with 4 additions and 0 deletions

View File

@ -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 );
}