Commit 75026d87 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Renamed BOARD_CONNECTED_ITEM::GetNet() -> GetNetCode()

Renamed BOARD_CONNECTED_ITEM::SetNet() -> SetNetCode()
Added BOARD_CONNECTED_ITEM::GetNet() for accessing NETINFO_ITEM* of a given item.
Fixed module editor crash when launched to edit a module from a PCB.
Replaced some BOARD::FindNet( item->GetNet() ) calls with BOARD_CONNECTED_ITEM::GetNet().
parent 151826b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On )
    {
        for( ; Track != NULL; Track = Track->Next() )
        {
            if( net_code == Track->GetNet() )
            if( net_code == Track->GetNetCode() )
                break;
        }
    }
@@ -112,7 +112,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On )

    while( Track )                  /* Flag change */
    {
        if( (net_code >= 0 ) && (net_code != Track->GetNet()) )
        if( ( net_code >= 0 ) && ( net_code != Track->GetNetCode() ) )
            break;

        OnModify();
+1 −1
Original line number Diff line number Diff line
@@ -499,7 +499,7 @@ int genPlacementRoutingMatrix( BOARD* aBrd, EDA_MSG_PANEL* messagePanel )
    TRACK TmpSegm( NULL );

    TmpSegm.SetLayer( UNDEFINED_LAYER );
    TmpSegm.SetNet( -1 );
    TmpSegm.SetNetCode( -1 );
    TmpSegm.SetWidth( RoutingMatrix.m_GridRouting / 2 );

    EDA_ITEM* PtStruct = aBrd->m_Drawings;
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
            {
            case PCB_PAD_T:
                Pad = (D_PAD*) GetScreen()->GetCurItem();
                autoroute_net_code = Pad->GetNet();
                autoroute_net_code = Pad->GetNetCode();
                break;

            default:
+5 −5
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag )
    {
        D_PAD* pad = aPcb->GetPad( i );

        if( net_code != pad->GetNet() || (flag & FORCE_PADS) )
        if( net_code != pad->GetNetCode() || (flag & FORCE_PADS) )
        {
            ::PlacePad( pad, HOLE, marge, WRITE_CELL );
        }
@@ -247,7 +247,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag )
                tmpSegm.SetShape( edge->GetShape() );
                tmpSegm.SetWidth( edge->GetWidth() );
                tmpSegm.m_Param = edge->GetAngle();
                tmpSegm.SetNet( -1 );
                tmpSegm.SetNetCode( -1 );

                TraceSegmentPcb( &tmpSegm, HOLE, marge, WRITE_CELL );
                TraceSegmentPcb( &tmpSegm, VIA_IMPOSSIBLE, via_marge, WRITE_OR_CELL );
@@ -284,7 +284,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag )
            tmpSegm.SetShape( DrawSegm->GetShape() );
            tmpSegm.SetWidth( DrawSegm->GetWidth() );
            tmpSegm.m_Param = DrawSegm->GetAngle();
            tmpSegm.SetNet( -1 );
            tmpSegm.SetNetCode( -1 );

            TraceSegmentPcb( &tmpSegm, type_cell, marge, WRITE_CELL );
        }
@@ -335,7 +335,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag )
    /* Put tracks and vias on matrix */
    for( TRACK* track = aPcb->m_Track; track; track = track->Next() )
    {
        if( net_code == track->GetNet() )
        if( net_code == track->GetNetCode() )
            continue;

        TraceSegmentPcb( track, HOLE, marge, WRITE_CELL );
@@ -374,7 +374,7 @@ int Build_Work( BOARD* Pcb )

        pt_pad = pt_rats->m_PadStart;

        current_net_code = pt_pad->GetNet();
        current_net_code = pt_pad->GetNetCode();
        pt_ch = pt_rats;

        r1 = ( pt_pad->GetPosition().y - RoutingMatrix.m_BrdBox.GetY() + demi_pas )
+3 −3
Original line number Diff line number Diff line
@@ -1180,7 +1180,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row,
        g_CurrentTrackSegment->SetWidth( pcb->GetCurrentViaSize() );
        g_CurrentTrackSegment->SetShape( pcb->GetDesignSettings().m_CurrentViaType );

        g_CurrentTrackSegment->SetNet( current_net_code );
        g_CurrentTrackSegment->SetNetCode( current_net_code );
    }
    else    // placement of a standard segment
    {
@@ -1198,7 +1198,7 @@ static void OrCell_Trace( BOARD* pcb, int col, int row,
                                         ( RoutingMatrix.m_GridRouting * row ),
                                         pcb->GetBoundingBox().GetY() +
                                         ( RoutingMatrix.m_GridRouting * col )));
        g_CurrentTrackSegment->SetNet( current_net_code );
        g_CurrentTrackSegment->SetNetCode( current_net_code );

        if( g_CurrentTrackSegment->Back() == NULL ) /* Start trace. */
        {
@@ -1319,7 +1319,7 @@ static void AddNewTrace( PCB_EDIT_FRAME* pcbframe, wxDC* DC )
    }

    // Insert new segments in  real board
    int    netcode    = g_FirstTrackSegment->GetNet();
    int    netcode    = g_FirstTrackSegment->GetNetCode();
    TRACK* firstTrack = g_FirstTrackSegment;
    int    newCount   = g_CurrentTrackList.GetCount();

Loading