From 82a0eb4413b08826b52227f2c4200ad89944b76f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 30 Aug 2019 23:31:41 +0100 Subject: [PATCH] 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 315a99e0fed45ab05e926ac7c5407fe5741e31c6) --- pcbnew/tools/edit_tool.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 88dc49d80a..3fbfa38e8e 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -564,8 +564,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent ) for( auto item : selection ) { BOARD_ITEM* i = static_cast( 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