Use Move() instead of SetPosition() so that the second pt gets updated too.
Fixes: lp:1841989
* https://bugs.launchpad.net/kicad/+bug/1841989
(cherry picked from commit 315a99e0fe
)
This commit is contained in:
parent
be7215402b
commit
82a0eb4413
|
@ -564,8 +564,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
for( auto item : selection )
|
for( auto item : selection )
|
||||||
{
|
{
|
||||||
BOARD_ITEM* i = static_cast<BOARD_ITEM*>( item );
|
BOARD_ITEM* i = static_cast<BOARD_ITEM*>( item );
|
||||||
auto delta = VECTOR2I( i->GetPosition() ) - totalMovement;
|
i->Move( -totalMovement );
|
||||||
i->SetPosition( wxPoint( delta.x, delta.y ) );
|
|
||||||
|
|
||||||
// And what about flipping and rotation?
|
// And what about flipping and rotation?
|
||||||
// for now, they won't be undone, but maybe that is how
|
// for now, they won't be undone, but maybe that is how
|
||||||
|
|
Loading…
Reference in New Issue