From d4d801204f5036e7519eb05673ba3827da2e453f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 20 Sep 2013 15:01:08 +0200 Subject: [PATCH] Added cursor for the move tool --- pcbnew/tools/move_tool.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 5143f5b3a0..7ab86b1b7a 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -73,11 +73,13 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VECTOR2D dragPosition; bool dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? - VIEW* view = m_toolMgr->GetView(); + VIEW* view = getView(); + VIEW_CONTROLS* controls = getViewControls(); view->Add( &m_items ); - getViewControls()->SetSnapping( true ); - getViewControls()->SetAutoPan( true ); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -163,8 +165,9 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_itemsState.clear(); m_items.Clear(); view->Remove( &m_items ); - getViewControls()->SetSnapping( false ); - getViewControls()->SetAutoPan( false ); + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); return 0; }