solved pcbnew: minor bug when only one copper layer selected: zone properties layer list displayed component layer instead of copper layer

This commit is contained in:
charras 2008-10-07 17:59:02 +00:00
parent 6f84112375
commit 667a6498de
4 changed files with 1042 additions and 983 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -257,7 +257,7 @@ void WinEDA_ZoneFrame::OnInitDialog( wxInitDialogEvent& event )
BOARD* board = m_Parent->m_Pcb;
SetFont( *g_DialogFont );
SetFocus(); // Required under wxGTK if we want to demiss the dialog with the ESC key
wxString title = _( "Zone clearance value:" ) + ReturnUnitSymbol( g_UnitMetric );
@ -295,7 +295,7 @@ void WinEDA_ZoneFrame::OnInitDialog( wxInitDialogEvent& event )
}
if( grid_routing == 0 ) // No Grid: fill with polygons
selection = 4;
m_GridCtrl->SetSelection( selection );
if( m_Zone_Container )
@ -353,13 +353,14 @@ void WinEDA_ZoneFrame::OnInitDialog( wxInitDialogEvent& event )
break;
}
/* build copper layers list */
int layer_cnt = board->GetCopperLayerCount();
for( int ii = 0; ii < board->GetCopperLayerCount(); ii++ )
{
wxString msg;
int layer_number = COPPER_LAYER_N;
if( layer_cnt == 0 || ii < layer_cnt - 1 )
if( layer_cnt <= 1 || ii < layer_cnt - 1 )
layer_number = ii;
else if( ii == layer_cnt - 1 )
layer_number = LAYER_CMP_N;

View File

@ -898,6 +898,7 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
}
else
{
zone_container->m_FilledPolysList.clear();
zone_container->m_GridFillValue = g_GridRoutingSize;
error_level = zone_container->Fill_Zone( this, DC, verbose );
}
@ -935,6 +936,7 @@ int WinEDA_PcbFrame::Fill_All_Zones( wxDC* DC, bool verbose )
for( int ii = 0; ii < m_Pcb->GetAreaCount(); ii++ )
{
zone_container = m_Pcb->GetArea( ii );
zone_container->m_FilledPolysList.clear();
error_level = Fill_Zone( NULL, zone_container, verbose );
if( error_level && !verbose )
break;