Browse Source

Don't save file state for an empty file

pull/16/head
Jon Evans 5 years ago
parent
commit
9ebdd4bd83
  1. 13
      common/eda_base_frame.cpp

13
common/eda_base_frame.cpp

@ -641,16 +641,19 @@ void EDA_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
bool fileOpen = m_isClosing && m_isNonUserClose;
wxFileName rfn( GetCurrentFileName() );
rfn.MakeRelativeTo( Prj().GetProjectPath() );
Prj().GetLocalSettings().SaveFileState( rfn.GetFullPath(), &aCfg->m_Window, fileOpen );
wxString currentlyOpenedFile = GetCurrentFileName();
if( !currentlyOpenedFile.IsEmpty() )
{
wxFileName rfn( currentlyOpenedFile );
rfn.MakeRelativeTo( Prj().GetProjectPath() );
Prj().GetLocalSettings().SaveFileState( rfn.GetFullPath(), &aCfg->m_Window, fileOpen );
}
// Save the recently used files list
if( m_fileHistory )
{
// Save the currently opened file in the file history
wxString currentlyOpenedFile = GetCurrentFileName();
if( !currentlyOpenedFile.IsEmpty() )
UpdateFileHistory( currentlyOpenedFile );

Loading…
Cancel
Save