Pcbnew: Do not disable grid snap in copy to clipboard operation

This simple commit makes the Pcbnew copy to clipboard operation snap the
obtained cursor position to grid before the anchors are calculated. This
is also the way the move operation has been apparently working so far.

To be clear, this will not remove all cases where the copy reference
point is not aligned to the grid (see the linked Gitlab issue for
details about the problem). This will still occur for zone outlines that
are not axis-aligned. But such behavior has been so far also present in
the moving operation, so this may be as designed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7507
This commit is contained in:
Mikolaj Wielgus 2021-02-13 22:43:09 +01:00 committed by Jon Evans
parent 1608282a57
commit 379c28340f
1 changed files with 1 additions and 1 deletions

View File

@ -2299,7 +2299,7 @@ int EDIT_TOOL::copyToClipboard( const TOOL_EVENT& aEvent )
}
else
{
refPoint = grid.BestDragOrigin( getViewControls()->GetCursorPosition( false ), items );
refPoint = grid.BestDragOrigin( getViewControls()->GetCursorPosition(), items );
}
selection.SetReferencePoint( refPoint );