GerbView: only erase current layer if a new file is chosen

This commit is contained in:
Jon Evans 2018-02-27 20:59:47 -05:00 committed by jean-pierre charras
parent 490a2105c3
commit de483ac1aa
1 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,6 @@ void GERBVIEW_FRAME::Files_io( wxCommandEvent& event )
switch( id ) switch( id )
{ {
case wxID_FILE: case wxID_FILE:
Erase_Current_DrawLayer( false );
LoadGerberFiles( wxEmptyString ); LoadGerberFiles( wxEmptyString );
break; break;
@ -215,6 +214,8 @@ bool GERBVIEW_FRAME::LoadGerberFiles( const wxString& aFullFileName )
m_mruPath = currentPath = filename.GetPath(); m_mruPath = currentPath = filename.GetPath();
} }
Erase_Current_DrawLayer( false );
// Set the busy cursor // Set the busy cursor
wxBusyCursor wait; wxBusyCursor wait;