Gerber viewer: don't go to next layer if on last layer
This commit is contained in:
parent
4a6ac8ca2f
commit
1460442a80
|
@ -327,7 +327,7 @@ int GERBVIEW_CONTROL::LayerNext( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
int layer = m_frame->GetActiveLayer();
|
||||
|
||||
if( layer < GERBER_DRAWLAYERS_COUNT - 1 )
|
||||
if( layer < ( (int) GERBER_FILE_IMAGE_LIST::GetImagesList().GetLoadedImageCount() - 1 ) )
|
||||
m_frame->SetActiveLayer( layer + 1, true );
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue