Use Move() instead of SetPosition() so that the second pt gets updated too.

Fixes: lp:1841989
* https://bugs.launchpad.net/kicad/+bug/1841989
This commit is contained in:
Jeff Young 2019-08-30 23:31:41 +01:00
parent 33625dbd9d
commit 315a99e0fe
1 changed files with 1 additions and 2 deletions

View File

@ -463,8 +463,7 @@ int EDIT_TOOL::Move( const TOOL_EVENT& aEvent )
for( auto item : selection )
{
BOARD_ITEM* i = static_cast<BOARD_ITEM*>( item );
auto delta = VECTOR2I( i->GetPosition() ) - totalMovement;
i->SetPosition( wxPoint( delta.x, delta.y ) );
i->Move( -totalMovement );
// And what about flipping and rotation?
// for now, they won't be undone, but maybe that is how