From 75db0cebb7458b22c5f9a0e6c65ea5aa61e2dcdd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 7 Jan 2014 14:22:37 +0100 Subject: [PATCH] Fixed Push and Shove and ratsnest cooperation (tracks added by PNS are taken into account while calculating ratsnest). --- pcbnew/router/pns_router.cpp | 9 ++++----- pcbnew/router/router_tool.cpp | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 151b28ffa1..33a512b451 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -263,7 +263,7 @@ void PNS_ROUTER::SyncWorld() if( type == PCB_TRACE_T ) item = syncTrack( t ); else if( type == PCB_VIA_T ) - item = syncVia( static_cast (t) ); + item = syncVia( static_cast( t ) ); if( item ) m_world->Add( item ); @@ -754,13 +754,12 @@ bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) void PNS_ROUTER::StopRouting() { + // Update the ratsnest with new changes + m_board->GetRatsnest()->Recalculate( m_currentNet ); + if( !RoutingInProgress() ) return; - // highlightCurrent(false); - - // Update the ratsnest - m_board->GetRatsnest()->Recalculate( m_currentNet ); EraseView(); m_state = IDLE; diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 6e8d732040..b301901048 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -369,8 +369,7 @@ void ROUTER_TOOL::startRouting() } } - if( m_router->RoutingInProgress() ) - m_router->StopRouting(); + m_router->StopRouting(); ctls->SetAutoPan( false ); ctls->ForceCursorPosition( false );