From 5e3ab406e270b938a77df6397f496e7ac5b9b438 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 11:45:20 +0200 Subject: [PATCH] Enabled snapping for the move tool. --- pcbnew/tools/move_tool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 54e5afe7af..f0783f6a40 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "selection_tool.h" #include "move_tool.h" @@ -74,6 +75,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VIEW_GROUP items( view ); view->Add( &items ); + m_toolMgr->GetViewControls()->SetSnapping( true ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -164,6 +166,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_itemsState.clear(); items.Clear(); view->Remove( &items ); + m_toolMgr->GetViewControls()->SetSnapping( false ); return 0; }