Commit 5e3ab406 authored by Maciej Suminski's avatar Maciej Suminski

Enabled snapping for the move tool.

parent 0dc587e2
......@@ -26,6 +26,7 @@
#include <class_module.h>
#include <tool/tool_manager.h>
#include <view/view_group.h>
#include <view/view_controls.h>
#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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment