Don't save file state for an empty file
This commit is contained in:
parent
f1b1e59cf0
commit
9ebdd4bd83
|
@ -641,16 +641,19 @@ void EDA_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
|
|
||||||
bool fileOpen = m_isClosing && m_isNonUserClose;
|
bool fileOpen = m_isClosing && m_isNonUserClose;
|
||||||
|
|
||||||
wxFileName rfn( GetCurrentFileName() );
|
wxString currentlyOpenedFile = GetCurrentFileName();
|
||||||
|
|
||||||
|
if( !currentlyOpenedFile.IsEmpty() )
|
||||||
|
{
|
||||||
|
wxFileName rfn( currentlyOpenedFile );
|
||||||
rfn.MakeRelativeTo( Prj().GetProjectPath() );
|
rfn.MakeRelativeTo( Prj().GetProjectPath() );
|
||||||
Prj().GetLocalSettings().SaveFileState( rfn.GetFullPath(), &aCfg->m_Window, fileOpen );
|
Prj().GetLocalSettings().SaveFileState( rfn.GetFullPath(), &aCfg->m_Window, fileOpen );
|
||||||
|
}
|
||||||
|
|
||||||
// Save the recently used files list
|
// Save the recently used files list
|
||||||
if( m_fileHistory )
|
if( m_fileHistory )
|
||||||
{
|
{
|
||||||
// Save the currently opened file in the file history
|
// Save the currently opened file in the file history
|
||||||
wxString currentlyOpenedFile = GetCurrentFileName();
|
|
||||||
|
|
||||||
if( !currentlyOpenedFile.IsEmpty() )
|
if( !currentlyOpenedFile.IsEmpty() )
|
||||||
UpdateFileHistory( currentlyOpenedFile );
|
UpdateFileHistory( currentlyOpenedFile );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue