Select next/prev copper layer whether we start on copper or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/11600
This commit is contained in:
parent
a09bd4ae12
commit
f7fcc310f8
|
@ -356,9 +356,6 @@ int PCB_CONTROL::LayerNext( const TOOL_EVENT& aEvent )
|
|||
int layer = editFrame->GetActiveLayer();
|
||||
int startLayer = layer;
|
||||
|
||||
if( layer < F_Cu || layer > B_Cu )
|
||||
return 0;
|
||||
|
||||
while( startLayer != ++layer )
|
||||
{
|
||||
if( brd->IsLayerVisible( static_cast<PCB_LAYER_ID>( layer ) ) && IsCopperLayer( layer ) )
|
||||
|
@ -382,9 +379,6 @@ int PCB_CONTROL::LayerPrev( const TOOL_EVENT& aEvent )
|
|||
int layer = editFrame->GetActiveLayer();
|
||||
int startLayer = layer;
|
||||
|
||||
if( layer < F_Cu || layer > B_Cu )
|
||||
return 0;
|
||||
|
||||
while( startLayer != --layer )
|
||||
{
|
||||
if( IsCopperLayer( layer ) // also test for valid layer id (layer >= F_Cu)
|
||||
|
@ -397,7 +391,6 @@ int PCB_CONTROL::LayerPrev( const TOOL_EVENT& aEvent )
|
|||
layer = B_Cu + 1;
|
||||
}
|
||||
|
||||
|
||||
wxCHECK( IsCopperLayer( layer ), 0 );
|
||||
editFrame->SwitchLayer( ToLAYER_ID( layer ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue