Commit f406e9d9 authored by dickelbeck's avatar dickelbeck
Browse files

drc dialog fixes

parent 6bd9b7fc
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -9,9 +9,12 @@ email address.
2008-Feb-22 UPDATE   Dick Hollenbeck <dick@softplc.com>
2008-Feb-22 UPDATE   Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
+pcbnew
+pcbnew
    specctra_export.cpp: added DSN 'outline' support from EDGE_MODULEs.
  * specctra_export.cpp: added DSN 'outline' support from EDGE_MODULEs.
    lines and circles, not arcs.
    lines and circles, not arcs.
    factored out EDGE_MODULE::ShowShape() from EDGE_MODULE::Show().
  * factored out EDGE_MODULE::ShowShape() from EDGE_MODULE::Show().
  * drc.cpp changed AsSecondItem to HasSecondItem and test it in generating
    the file report and when making the popup menu in the dialog_drc and
    when generating the html list item.




2008-Feb-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-Feb-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
+33 −33
Original line number Original line Diff line number Diff line
@@ -143,7 +143,7 @@ void MARKER::Display_Infos( WinEDA_DrawFrame* frame )
    txtA << DRC_ITEM::ShowCoord( rpt.GetPointA() ) << wxT(": ") << rpt.GetTextA();
    txtA << DRC_ITEM::ShowCoord( rpt.GetPointA() ) << wxT(": ") << rpt.GetTextA();


    wxString txtB;
    wxString txtB;
	if ( rpt.AsSecondItem() )
    if ( rpt.HasSecondItem() )
        txtB << DRC_ITEM::ShowCoord( rpt.GetPointB() ) << wxT(": ") << rpt.GetTextB();
        txtB << DRC_ITEM::ShowCoord( rpt.GetPointB() ) << wxT(": ") << rpt.GetTextB();


    text_pos = 25;
    text_pos = 25;
+107 −101
Original line number Original line Diff line number Diff line
@@ -952,8 +952,11 @@ void DrcDialog::OnRightUpUnconnected( wxMouseEvent& event )
        mItem = new wxMenuItem( &menu, ID_POPUP_UNCONNECTED_A,  dItem->GetTextA() );
        mItem = new wxMenuItem( &menu, ID_POPUP_UNCONNECTED_A,  dItem->GetTextA() );
        menu.Append( mItem );
        menu.Append( mItem );


        if( dItem->HasSecondItem() )
        {
            mItem = new wxMenuItem( &menu, ID_POPUP_UNCONNECTED_B,  dItem->GetTextB() );
            mItem = new wxMenuItem( &menu, ID_POPUP_UNCONNECTED_B,  dItem->GetTextB() );
            menu.Append( mItem );
            menu.Append( mItem );
        }


        PopupMenu( &menu );
        PopupMenu( &menu );
    }
    }
@@ -981,8 +984,11 @@ void DrcDialog::OnRightUpClearance( wxMouseEvent& event )
        mItem = new wxMenuItem( &menu, ID_POPUP_MARKERS_A,  dItem->GetTextA() );
        mItem = new wxMenuItem( &menu, ID_POPUP_MARKERS_A,  dItem->GetTextA() );
        menu.Append( mItem );
        menu.Append( mItem );


        if( dItem->HasSecondItem() )
        {
            mItem = new wxMenuItem( &menu, ID_POPUP_MARKERS_B,  dItem->GetTextB() );
            mItem = new wxMenuItem( &menu, ID_POPUP_MARKERS_B,  dItem->GetTextB() );
            menu.Append( mItem );
            menu.Append( mItem );
        }


        PopupMenu( &menu );
        PopupMenu( &menu );
    }
    }
+6 −1
Original line number Original line Diff line number Diff line
@@ -510,11 +510,16 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart )
        // This test seems necessary since the dialog box that displays the
        // This test seems necessary since the dialog box that displays the
        // desired via hole size and width does not enforce a hole size smaller
        // desired via hole size and width does not enforce a hole size smaller
        // than the via's diameter.
        // than the via's diameter.
        if( !aRefSeg->GetDrillValue() > aRefSeg->m_Width )
        if( aRefSeg->GetDrillValue() > aRefSeg->m_Width )
        {
        {
#if 0       // a temporary way to fix a bad board here, change for your values
            if( aRefSeg->GetDrillValue()==120 && aRefSeg->m_Width==100 )
                aRefSeg->m_Width = 180;
#else
            m_currentMarker = fillMarker( aRefSeg, NULL,
            m_currentMarker = fillMarker( aRefSeg, NULL,
                                DRCE_VIA_HOLE_BIGGER, m_currentMarker );
                                DRCE_VIA_HOLE_BIGGER, m_currentMarker );
            return false;
            return false;
#endif
        }
        }


        // For microvias: test if they are blindvias and only between 2 layers
        // For microvias: test if they are blindvias and only between 2 layers
+28 −12
Original line number Original line Diff line number Diff line
@@ -53,7 +53,10 @@ void WinEDA_PcbFrame::Liste_Equipot( wxCommandEvent& event )
        List->Append( Line );
        List->Append( Line );
    }
    }


    ii = List->ShowModal(); List->Destroy();
    ii = List->ShowModal();

    List->Destroy();

    if( ii < 0 )
    if( ii < 0 )
        return;
        return;


@@ -64,6 +67,7 @@ void WinEDA_PcbFrame::Liste_Equipot( wxCommandEvent& event )
        /* calcul adr relative du nom de la pastille reference de la piste */
        /* calcul adr relative du nom de la pastille reference de la piste */
        if( !WildCompareString( msg, Equipot->m_Netname, FALSE ) )
        if( !WildCompareString( msg, Equipot->m_Netname, FALSE ) )
            continue;
            continue;

        if( ii == jj )
        if( ii == jj )
        {
        {
            ii = Equipot->GetNet();
            ii = Equipot->GetNet();
@@ -78,6 +82,7 @@ void WinEDA_PcbFrame::Liste_Equipot( wxCommandEvent& event )


    if( g_HightLigt_Status )
    if( g_HightLigt_Status )
        Hight_Light( &dc );
        Hight_Light( &dc );

    g_HightLigth_NetCode = ii;
    g_HightLigth_NetCode = ii;
    Hight_Light( &dc );
    Hight_Light( &dc );
}
}
@@ -95,7 +100,7 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC )


    // use this scheme because of pad is higher priority than tracks in the
    // use this scheme because of pad is higher priority than tracks in the
    // search, and finding a pad, instead of a track on a pad,
    // search, and finding a pad, instead of a track on a pad,
    // allows us to fire a message to eescema.
    // allows us to fire a message to eeschema.


    GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();
    GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();


@@ -168,20 +173,16 @@ void WinEDA_PcbFrame::DrawHightLight( wxDC* DC, int NetCode )
    else
    else
        draw_mode = GR_AND | GR_SURBRILL;
        draw_mode = GR_AND | GR_SURBRILL;


    /* Redraw pads */
#if 0   // does not unhighlight properly
    for( MODULE* module = m_Pcb->m_Modules;  module;   module = module->Next() )
    // redraw the zones with the NetCode
    for( SEGZONE* zone = m_Pcb->m_Zone;   zone;   zone = zone->Next() )
    {
    {
        Pad_Surbrillance( DrawPanel, DC, module, NetCode );
        if( zone->GetNet() == NetCode )
    }

    /* Redraw track and vias: */
    for( TRACK* pts = m_Pcb->m_Track;   pts;   pts = pts->Next() )
        {
        {
        if( pts->GetNet() == NetCode )
            zone->Draw( DrawPanel, DC, draw_mode );
        {
            pts->Draw( DrawPanel, DC, draw_mode );
        }
        }
    }
    }
#endif


    wxPoint zero(0,0);  // construct outside loop for speed
    wxPoint zero(0,0);  // construct outside loop for speed


@@ -194,6 +195,21 @@ void WinEDA_PcbFrame::DrawHightLight( wxDC* DC, int NetCode )
            (*zc)->Draw( DrawPanel, DC, zero, draw_mode );
            (*zc)->Draw( DrawPanel, DC, zero, draw_mode );
        }
        }
    }
    }

    /* Redraw pads */
    for( MODULE* module = m_Pcb->m_Modules;  module;   module = module->Next() )
    {
        Pad_Surbrillance( DrawPanel, DC, module, NetCode );
    }

    /* Redraw track and vias: */
    for( TRACK* pts = m_Pcb->m_Track;   pts;   pts = pts->Next() )
    {
        if( pts->GetNet() == NetCode )
        {
            pts->Draw( DrawPanel, DC, draw_mode );
        }
    }
}
}




+39 −39

File changed.

Contains only whitespace changes.

Loading