Fix sheet pin align to grid issue.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16920
This commit is contained in:
Wayne Stambaugh 2024-02-28 11:57:20 -05:00
parent f086038684
commit 141d03c266
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 CERN
* Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2019-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -1689,7 +1689,7 @@ int SCH_MOVE_TOOL::AlignToGrid( const TOOL_EVENT& aEvent )
else
newPos = pin->GetPosition() + br_delta;
VECTOR2I delta = grid.AlignGrid( newPos, selectionGrid ) - pin->GetPosition();
VECTOR2I delta = grid.AlignGrid( newPos - pin->GetPosition(), selectionGrid );
if( delta != VECTOR2I( 0, 0 ) )
{