Skip project backup in standalone mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4867
This commit is contained in:
parent
2ea42196ed
commit
a2041073ee
|
@ -729,10 +729,13 @@ bool SCH_EDIT_FRAME::SaveProject()
|
||||||
|
|
||||||
Pgm().GetSettingsManager().SaveProject();
|
Pgm().GetSettingsManager().SaveProject();
|
||||||
|
|
||||||
|
if( !Kiface().IsSingle() )
|
||||||
|
{
|
||||||
WX_STRING_REPORTER backupReporter( &msg );
|
WX_STRING_REPORTER backupReporter( &msg );
|
||||||
|
|
||||||
if( !GetSettingsManager()->TriggerBackupIfNeeded( backupReporter ) )
|
if( !GetSettingsManager()->TriggerBackupIfNeeded( backupReporter ) )
|
||||||
SetStatusText( msg, 0 );
|
SetStatusText( msg, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
|
|
||||||
|
@ -782,9 +785,12 @@ bool SCH_EDIT_FRAME::doAutoSave()
|
||||||
{
|
{
|
||||||
m_autoSaveState = false;
|
m_autoSaveState = false;
|
||||||
|
|
||||||
if( GetSettingsManager()->GetCommonSettings()->m_Backup.backup_on_autosave )
|
if( !Kiface().IsSingle() &&
|
||||||
|
GetSettingsManager()->GetCommonSettings()->m_Backup.backup_on_autosave )
|
||||||
|
{
|
||||||
GetSettingsManager()->TriggerBackupIfNeeded( NULL_REPORTER::GetInstance() );
|
GetSettingsManager()->TriggerBackupIfNeeded( NULL_REPORTER::GetInstance() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return autoSaveOk;
|
return autoSaveOk;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <msgpanel.h>
|
#include <msgpanel.h>
|
||||||
#include <fp_lib_table.h>
|
#include <fp_lib_table.h>
|
||||||
|
#include <kiface_i.h>
|
||||||
#include <kiway.h>
|
#include <kiway.h>
|
||||||
#include <kiway_player.h>
|
#include <kiway_player.h>
|
||||||
#include <trace_helpers.h>
|
#include <trace_helpers.h>
|
||||||
|
@ -783,10 +784,13 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !Kiface().IsSingle() )
|
||||||
|
{
|
||||||
WX_STRING_REPORTER backupReporter( &upperTxt );
|
WX_STRING_REPORTER backupReporter( &upperTxt );
|
||||||
|
|
||||||
if( GetSettingsManager()->TriggerBackupIfNeeded( backupReporter ) )
|
if( GetSettingsManager()->TriggerBackupIfNeeded( backupReporter ) )
|
||||||
upperTxt.clear();
|
upperTxt.clear();
|
||||||
|
}
|
||||||
|
|
||||||
GetBoard()->SetFileName( pcbFileName.GetFullPath() );
|
GetBoard()->SetFileName( pcbFileName.GetFullPath() );
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
|
@ -904,8 +908,11 @@ bool PCB_EDIT_FRAME::doAutoSave()
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
m_autoSaveState = false;
|
m_autoSaveState = false;
|
||||||
|
|
||||||
if( GetSettingsManager()->GetCommonSettings()->m_Backup.backup_on_autosave )
|
if( !Kiface().IsSingle() &&
|
||||||
|
GetSettingsManager()->GetCommonSettings()->m_Backup.backup_on_autosave )
|
||||||
|
{
|
||||||
GetSettingsManager()->TriggerBackupIfNeeded( NULL_REPORTER::GetInstance() );
|
GetSettingsManager()->TriggerBackupIfNeeded( NULL_REPORTER::GetInstance() );
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue