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