diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 4b6359b8ee..76089e3300 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -54,6 +54,7 @@ using namespace std::placeholders; #include #include #include +#include #include #include "router_tool.h" @@ -1034,7 +1035,7 @@ void ROUTER_TOOL::performDragging( int aMode ) highlightNet( true, m_startItem->Net() ); ctls->SetAutoPan( true ); - + m_gridHelper->SetAuxAxes( true, m_startSnapPoint, true ); frame()->UndoRedoBlock( true ); while( OPT_TOOL_EVENT evt = Wait() ) @@ -1064,6 +1065,7 @@ void ROUTER_TOOL::performDragging( int aMode ) m_startItem = nullptr; + m_gridHelper->SetAuxAxes( false ); frame()->UndoRedoBlock( false ); ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false ); @@ -1175,14 +1177,15 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent ) } VECTOR2I p0 = controls()->GetCursorPosition( false ); - + auto p = snapToItem( true, m_startItem, p0 ); int dragMode = aEvent.Parameter (); - bool dragStarted = m_router->StartDragging( p0, m_startItem, dragMode ); + bool dragStarted = m_router->StartDragging( p, m_startItem, dragMode ); if( !dragStarted ) return 0; + m_gridHelper->SetAuxAxes( true, p, true ); controls()->ShowCursor( true ); controls()->ForceCursorPosition( false ); controls()->SetAutoPan( true ); @@ -1210,6 +1213,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent ) if( m_router->RoutingInProgress() ) m_router->StopRouting(); + m_gridHelper->SetAuxAxes( false ); controls()->SetAutoPan( false ); controls()->ForceCursorPosition( false ); frame()->UndoRedoBlock( false );