diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 6d38406444..e66451b86b 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -836,7 +836,7 @@ void RN_DATA::Recalculate( int aNet ) updateNet( i ); } } - else // Recompute only specific net + else if( aNet > 0 ) // Recompute only specific net { updateNet( aNet ); } diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 5b6b5f6b31..151b28ffa1 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include // an ugly singleton for drawing debug items within the router context. @@ -626,6 +627,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) newBI->ClearFlags(); m_view->Add( newBI ); m_board->Add( newBI ); + m_board->GetRatsnest()->Update( static_cast( newBI ) ); newBI->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } @@ -757,6 +759,8 @@ void PNS_ROUTER::StopRouting() // highlightCurrent(false); + // Update the ratsnest + m_board->GetRatsnest()->Recalculate( m_currentNet ); EraseView(); m_state = IDLE;