Gerbview: don't erase current layer before loading files
Since we now load into the next available layer, don't erase our current layer.
This commit is contained in:
parent
45f1287a6c
commit
9a0d4f5ba4
|
@ -51,7 +51,6 @@ void GERBVIEW_FRAME::OnGbrFileHistory( wxCommandEvent& event )
|
||||||
|
|
||||||
if( !fn.IsEmpty() )
|
if( !fn.IsEmpty() )
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
|
||||||
LoadGerberFiles( fn );
|
LoadGerberFiles( fn );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +69,6 @@ void GERBVIEW_FRAME::OnDrlFileHistory( wxCommandEvent& event )
|
||||||
|
|
||||||
if( !fn.IsEmpty() )
|
if( !fn.IsEmpty() )
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
|
||||||
LoadExcellonFiles( fn );
|
LoadExcellonFiles( fn );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +87,6 @@ void GERBVIEW_FRAME::OnZipFileHistory( wxCommandEvent& event )
|
||||||
|
|
||||||
if( !filename.IsEmpty() )
|
if( !filename.IsEmpty() )
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
|
||||||
LoadZipArchiveFile( filename );
|
LoadZipArchiveFile( filename );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,13 +281,12 @@ bool GERBVIEW_FRAME::LoadListOfGerberAndDrillFiles( const wxString& aPath,
|
||||||
// Make sure we have a layer available to load into
|
// Make sure we have a layer available to load into
|
||||||
layer = getNextAvailableLayer( layer );
|
layer = getNextAvailableLayer( layer );
|
||||||
|
|
||||||
if( layer == NO_AVAILABLE_LAYERS && ii < aFilenameList.GetCount() - 1 )
|
if( layer == NO_AVAILABLE_LAYERS )
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
reporter.Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
reporter.Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
// Report the name of not loaded files:
|
// Report the name of not loaded files:
|
||||||
ii += 1;
|
|
||||||
while( ii < aFilenameList.GetCount() )
|
while( ii < aFilenameList.GetCount() )
|
||||||
{
|
{
|
||||||
filename = aFilenameList[ii++];
|
filename = aFilenameList[ii++];
|
||||||
|
@ -425,22 +421,14 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
|
||||||
|
|
||||||
m_lastFileName = filename.GetFullPath();
|
m_lastFileName = filename.GetFullPath();
|
||||||
|
|
||||||
SetActiveLayer( layer, false );
|
|
||||||
|
|
||||||
if( Read_EXCELLON_File( filename.GetFullPath() ) )
|
|
||||||
{
|
|
||||||
// Update the list of recent drill files.
|
|
||||||
UpdateFileHistory( filename.GetFullPath(), &m_drillFileHistory );
|
|
||||||
|
|
||||||
layer = getNextAvailableLayer( layer );
|
layer = getNextAvailableLayer( layer );
|
||||||
|
|
||||||
if( layer == NO_AVAILABLE_LAYERS && ii < filenamesList.GetCount()-1 )
|
if( layer == NO_AVAILABLE_LAYERS )
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
reporter.Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
reporter.Report( MSG_NO_MORE_LAYER, RPT_SEVERITY_ERROR );
|
||||||
|
|
||||||
// Report the name of not loaded files:
|
// Report the name of not loaded files:
|
||||||
ii += 1;
|
|
||||||
while( ii < filenamesList.GetCount() )
|
while( ii < filenamesList.GetCount() )
|
||||||
{
|
{
|
||||||
filename = filenamesList[ii++];
|
filename = filenamesList[ii++];
|
||||||
|
@ -449,8 +437,20 @@ bool GERBVIEW_FRAME::LoadExcellonFiles( const wxString& aFullFileName )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
SetActiveLayer( layer, false );
|
SetActiveLayer( layer, false );
|
||||||
|
|
||||||
|
if( Read_EXCELLON_File( filename.GetFullPath() ) )
|
||||||
|
{
|
||||||
|
// Update the list of recent drill files.
|
||||||
|
UpdateFileHistory( filename.GetFullPath(), &m_drillFileHistory );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
wxString txt = wxString::Format( MSG_NOT_LOADED, filename.GetFullName() );
|
||||||
|
reporter.Report( txt, RPT_SEVERITY_ERROR );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue