Gerbview: auto sort zip files based on X2 or extensions

This commit is contained in:
Mike Williams 2021-08-03 13:52:33 -04:00
parent da2e7e158b
commit 3338745637
1 changed files with 10 additions and 0 deletions

View File

@ -468,6 +468,7 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aReporter )
{
bool foundX2Gerbers = false;
wxString msg;
// Extract the path of aFullFileName. We use it to store temporary files
@ -628,13 +629,22 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
GERBER_FILE_IMAGE* gerber_image = GetGbrImage( layer );
if( gerber_image )
{
gerber_image->m_FileName = fname;
if( gerber_image->m_IsX2_file )
foundX2Gerbers = true;
}
layer = getNextAvailableLayer( layer );
SetActiveLayer( layer, false );
}
}
if( foundX2Gerbers )
SortLayersByX2Attributes();
else
SortLayersByFileExtension();
return success;
}