From 428e7a900b93228e0ccc3a78911251c12b936c3b Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 1 Apr 2019 06:22:51 -0700 Subject: [PATCH] pcbnew: Prevent aux axis after-image Grid helper in the router tool is persistent, so remember to turn off the aux axes after setting. Fixes: lp:1822577 * https://bugs.launchpad.net/kicad/+bug/1822577 --- pcbnew/router/router_tool.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index ef154660a7..76089e3300 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -1026,7 +1026,6 @@ void ROUTER_TOOL::performDragging( int aMode ) return; } - m_gridHelper->SetAuxAxes( true, m_startSnapPoint, true ); bool dragStarted = m_router->StartDragging( m_startSnapPoint, m_startItem, aMode ); if( !dragStarted ) @@ -1036,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() ) @@ -1066,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 ); @@ -1178,7 +1178,6 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent ) VECTOR2I p0 = controls()->GetCursorPosition( false ); auto p = snapToItem( true, m_startItem, p0 ); - m_gridHelper->SetAuxAxes( true, p, true ); int dragMode = aEvent.Parameter (); bool dragStarted = m_router->StartDragging( p, m_startItem, dragMode ); @@ -1186,6 +1185,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent ) if( !dragStarted ) return 0; + m_gridHelper->SetAuxAxes( true, p, true ); controls()->ShowCursor( true ); controls()->ForceCursorPosition( false ); controls()->SetAutoPan( true ); @@ -1213,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 );