Formatting.
This commit is contained in:
parent
2ad9da582a
commit
c7648b4dba
|
@ -84,33 +84,29 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
||||||
if( layer == curLayer )
|
if( layer == curLayer )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Copper layers cannot be selected unconditionally; how many
|
// Copper layers cannot be selected unconditionally; how many of those layers are currently
|
||||||
// of those layers are currently enabled needs to be checked.
|
// enabled needs to be checked.
|
||||||
if( IsCopperLayer( layer ) )
|
if( IsCopperLayer( layer ) )
|
||||||
{
|
{
|
||||||
// If only one copper layer is enabled, the only such layer
|
// If only one copper layer is enabled, the only such layer that can be selected to is
|
||||||
// that can be selected to is the "Back" layer (so the
|
// the "Back" layer (so the selection of any other copper layer is disregarded).
|
||||||
// selection of any other copper layer is disregarded).
|
|
||||||
if( GetBoard()->GetCopperLayerCount() < 2 )
|
if( GetBoard()->GetCopperLayerCount() < 2 )
|
||||||
{
|
{
|
||||||
if( layer != B_Cu )
|
if( layer != B_Cu )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If more than one copper layer is enabled, the "Copper"
|
// If more than one copper layer is enabled, the "Copper" and "Component" layers can be
|
||||||
// and "Component" layers can be selected, but the total
|
// selected, but the total number of copper layers determines which internal layers are
|
||||||
// number of copper layers determines which internal
|
// also capable of being selected.
|
||||||
// layers are also capable of being selected.
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( layer != B_Cu && layer != F_Cu && layer >= GetBoard()->GetCopperLayerCount() - 1 )
|
if( layer != B_Cu && layer != F_Cu && layer >= GetBoard()->GetCopperLayerCount() - 1 )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is yet more checking required? E.g. when the layer to be selected
|
// Is yet more checking required? E.g. when the layer to be selected is a non-copper layer,
|
||||||
// is a non-copper layer, or when switching between a copper layer
|
// or when switching between a copper layer and a non-copper layer, or vice-versa?
|
||||||
// and a non-copper layer, or vice-versa?
|
|
||||||
// ...
|
|
||||||
|
|
||||||
SetActiveLayer( layer );
|
SetActiveLayer( layer );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue