Commit 3017b617 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Added NETINFO_LIST::UNCONNECTED constant.

parent 78732f13
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1529,7 +1529,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void )
    {
        if( !GetArea( ii )->IsOnCopperLayer() )
        {
            GetArea( ii )->SetNet( 0 );
            GetArea( ii )->SetNet( NETINFO_LIST::UNCONNECTED );
            continue;
        }

@@ -2546,7 +2546,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
                    }

                    if( !aNetlist.IsDryRun() )
                        pad->SetNet( 0 );
                        pad->SetNet( NETINFO_LIST::UNCONNECTED );
                }
            }
            else                                 // Footprint pad has a net.
@@ -2649,7 +2649,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
                        aReporter->Report( msg );
                    }

                    previouspad->SetNet( 0 );
                    previouspad->SetNet( NETINFO_LIST::UNCONNECTED );
                }
                netname = pad->GetNetname();
                count = 1;
@@ -2662,7 +2662,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,

        // Examine last pad
        if( pad && count == 1 )
            pad->SetNet( 0 );
            pad->SetNet( NETINFO_LIST::UNCONNECTED );
    }

    // Last step: Some tests:
+3 −0
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ public:
            return NULL;
    }

    ///> Constant that holds the unconnected net number
    static const int UNCONNECTED;

#if defined(DEBUG)
    void Show() const;
#endif
+3 −0
Original line number Diff line number Diff line
@@ -162,3 +162,6 @@ void NETINFO_LIST::buildPadsFullList()

    m_Parent->m_Status_Pcb = LISTE_PAD_OK;
}


const int NETINFO_LIST::UNCONNECTED = 0;
+2 −2
Original line number Diff line number Diff line
@@ -690,7 +690,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
    if( aDC->LogicalToDeviceXRel( m_Width ) < MIN_TEXT_SIZE )
        return;

    if( GetNet() == 0 )
    if( GetNet() == NETINFO_LIST::UNCONNECTED )
        return;

    NETINFO_ITEM* net = ( (BOARD*) GetParent() )->FindNet( GetNet() );
@@ -952,7 +952,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
    }

    // Display the short netname:
    if( GetNet() == 0 )
    if( GetNet() == NETINFO_LIST::UNCONNECTED )
        return;

    if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
+1 −1
Original line number Diff line number Diff line
@@ -842,7 +842,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
        curr_track->end = NULL;
        curr_track->SetState( BUSY | IN_EDIT | BEGIN_ONPAD | END_ONPAD, false );
        curr_track->SetZoneSubNet( 0 );
        curr_track->SetNet( 0 );    // net code = 0 means not connected
        curr_track->SetNet( NETINFO_LIST::UNCONNECTED );
    }

    // If no pad, reset pointers and netcode, and do nothing else
Loading