Commit f406e9d9 authored by dickelbeck's avatar dickelbeck

drc dialog fixes

parent 6bd9b7fc
......@@ -9,9 +9,12 @@ email address.
2008-Feb-22 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+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.
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>
......
......@@ -143,7 +143,7 @@ void MARKER::Display_Infos( WinEDA_DrawFrame* frame )
txtA << DRC_ITEM::ShowCoord( rpt.GetPointA() ) << wxT(": ") << rpt.GetTextA();
wxString txtB;
if ( rpt.AsSecondItem() )
if ( rpt.HasSecondItem() )
txtB << DRC_ITEM::ShowCoord( rpt.GetPointB() ) << wxT(": ") << rpt.GetTextB();
text_pos = 25;
......
......@@ -952,8 +952,11 @@ void DrcDialog::OnRightUpUnconnected( wxMouseEvent& event )
mItem = new wxMenuItem( &menu, ID_POPUP_UNCONNECTED_A, dItem->GetTextA() );
menu.Append( mItem );
if( dItem->HasSecondItem() )
{
mItem = new wxMenuItem( &menu, ID_POPUP_UNCONNECTED_B, dItem->GetTextB() );
menu.Append( mItem );
}
PopupMenu( &menu );
}
......@@ -981,8 +984,11 @@ void DrcDialog::OnRightUpClearance( wxMouseEvent& event )
mItem = new wxMenuItem( &menu, ID_POPUP_MARKERS_A, dItem->GetTextA() );
menu.Append( mItem );
if( dItem->HasSecondItem() )
{
mItem = new wxMenuItem( &menu, ID_POPUP_MARKERS_B, dItem->GetTextB() );
menu.Append( mItem );
}
PopupMenu( &menu );
}
......
......@@ -510,11 +510,16 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart )
// This test seems necessary since the dialog box that displays the
// desired via hole size and width does not enforce a hole size smaller
// 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,
DRCE_VIA_HOLE_BIGGER, m_currentMarker );
return false;
#endif
}
// For microvias: test if they are blindvias and only between 2 layers
......
......@@ -53,7 +53,10 @@ void WinEDA_PcbFrame::Liste_Equipot( wxCommandEvent& event )
List->Append( Line );
}
ii = List->ShowModal(); List->Destroy();
ii = List->ShowModal();
List->Destroy();
if( ii < 0 )
return;
......@@ -64,6 +67,7 @@ void WinEDA_PcbFrame::Liste_Equipot( wxCommandEvent& event )
/* calcul adr relative du nom de la pastille reference de la piste */
if( !WildCompareString( msg, Equipot->m_Netname, FALSE ) )
continue;
if( ii == jj )
{
ii = Equipot->GetNet();
......@@ -78,6 +82,7 @@ void WinEDA_PcbFrame::Liste_Equipot( wxCommandEvent& event )
if( g_HightLigt_Status )
Hight_Light( &dc );
g_HightLigth_NetCode = ii;
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
// 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();
......@@ -168,20 +173,16 @@ void WinEDA_PcbFrame::DrawHightLight( wxDC* DC, int NetCode )
else
draw_mode = GR_AND | GR_SURBRILL;
/* Redraw pads */
for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() )
#if 0 // does not unhighlight properly
// redraw the zones with the NetCode
for( SEGZONE* zone = m_Pcb->m_Zone; zone; zone = zone->Next() )
{
Pad_Surbrillance( DrawPanel, DC, module, NetCode );
}
/* Redraw track and vias: */
for( TRACK* pts = m_Pcb->m_Track; pts; pts = pts->Next() )
if( zone->GetNet() == NetCode )
{
if( pts->GetNet() == NetCode )
{
pts->Draw( DrawPanel, DC, draw_mode );
zone->Draw( DrawPanel, DC, draw_mode );
}
}
#endif
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 );
}
}
/* 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 );
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment