Loading pcbnew/tools/move_tool.cpp +8 −5 Original line number Original line Diff line number Diff line Loading @@ -73,11 +73,13 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VECTOR2D dragPosition; VECTOR2D dragPosition; bool dragging = false; bool dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? 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 ); view->Add( &m_items ); getViewControls()->SetSnapping( true ); controls->ShowCursor( true ); getViewControls()->SetAutoPan( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); // Main loop: keep receiving events // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) while( OPT_TOOL_EVENT evt = Wait() ) Loading Loading @@ -163,8 +165,9 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_itemsState.clear(); m_itemsState.clear(); m_items.Clear(); m_items.Clear(); view->Remove( &m_items ); view->Remove( &m_items ); getViewControls()->SetSnapping( false ); controls->ShowCursor( false ); getViewControls()->SetAutoPan( false ); controls->SetSnapping( false ); controls->SetAutoPan( false ); return 0; return 0; } } Loading Loading
pcbnew/tools/move_tool.cpp +8 −5 Original line number Original line Diff line number Diff line Loading @@ -73,11 +73,13 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VECTOR2D dragPosition; VECTOR2D dragPosition; bool dragging = false; bool dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? 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 ); view->Add( &m_items ); getViewControls()->SetSnapping( true ); controls->ShowCursor( true ); getViewControls()->SetAutoPan( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); // Main loop: keep receiving events // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) while( OPT_TOOL_EVENT evt = Wait() ) Loading Loading @@ -163,8 +165,9 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_itemsState.clear(); m_itemsState.clear(); m_items.Clear(); m_items.Clear(); view->Remove( &m_items ); view->Remove( &m_items ); getViewControls()->SetSnapping( false ); controls->ShowCursor( false ); getViewControls()->SetAutoPan( false ); controls->SetSnapping( false ); controls->SetAutoPan( false ); return 0; return 0; } } Loading