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

Enabled snapping for the move tool.

parent 0dc587e2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
}