From 9b2a45013388499460362f776077ebdf4d48946f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 12 Sep 2013 10:54:11 +0200 Subject: [PATCH] Fixed rollback of traces movement. --- pcbnew/tools/move_tool.cpp | 2 +- pcbnew/tools/move_tool.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index f0783f6a40..f7839211c1 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -61,7 +61,7 @@ void MOVE_TOOL::Reset() } // the tool launches upon reception of activate ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveMove")); + Go( &MOVE_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); } diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 1022230a69..1645237527 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -89,7 +89,8 @@ private: void RestorePosition() { - item->SetPosition( wxPoint( position.x, position.y ) ); + wxPoint curPosition = item->GetPosition(); + item->Move( wxPoint( position.x - curPosition.x, position.y - curPosition.y ) ); } void RestoreVisibility()