void PNS_ROUTER::StopRouting()
{
    // Update the ratsnest with new changes

    if( m_placer )
    {
        std::vector<int> nets;
        m_placer->GetModifiedNets( nets );

        // Update the ratsnest with new changes
		for ( auto n : nets )
            m_iface->UpdateNet( n );
    }

    if( !RoutingInProgress() )
        return;

    if( m_placer )
        delete m_placer;

    if( m_dragger )
        delete m_dragger;

    m_placer = NULL;
    m_dragger = NULL;

    m_iface->EraseView();

    m_state = IDLE;
    m_world->KillChildren();
    m_world->ClearRanks();
}
void PNS_ROUTER::StopRouting()
{
    // Update the ratsnest with new changes

    if( m_placer )
    {
        std::vector<int> nets;
        m_placer->GetModifiedNets( nets );

        for( int n : nets )
        {
            // Update the ratsnest with new changes
            m_board->GetRatsnest()->Recalculate( n );
        }
    }

    if( !RoutingInProgress() )
        return;

    if( m_placer )
        delete m_placer;

    if( m_dragger )
        delete m_dragger;

    m_placer = NULL;
    m_dragger = NULL;

    eraseView();

    m_state = IDLE;
    m_world->KillChildren();
    m_world->ClearRanks();
}