DS_DATA_MODEL::LoadDrawingSheet actually was meant to accept blank filenames as a good thing

It was there...if you stared at it long enough
This commit is contained in:
Marek Roszko 2021-05-01 15:55:08 -04:00
parent a38ad7f678
commit 0dd746548a
1 changed files with 8 additions and 1 deletions

View File

@ -817,12 +817,19 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
if( fullFileName.IsEmpty() )
wxGetEnv( wxT( "KICAD_WKSFILE" ), &fullFileName );
if( fullFileName.IsEmpty() || !wxFileExists( fullFileName ) )
if( fullFileName.IsEmpty() )
{
#if 0
if( !fullFileName.IsEmpty() )
wxLogMessage( wxT( "Drawing sheet file <%s> not found" ), fullFileName.GetData() );
#endif
SetDefaultLayout();
return true; // we assume its fine / default init
}
if( !wxFileExists( fullFileName ) )
{
SetDefaultLayout();
return false;
}