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();
|
||||
|
||||
if( !Kiface().IsSingle() )
|
||||
{
|
||||
WX_STRING_REPORTER backupReporter( &msg );
|
||||
|
||||
if( !GetSettingsManager()->TriggerBackupIfNeeded( backupReporter ) )
|
||||
SetStatusText( msg, 0 );
|
||||
}
|
||||
|
||||
UpdateTitle();
|
||||
|
||||
|
@ -782,9 +785,12 @@ bool SCH_EDIT_FRAME::doAutoSave()
|
|||
{
|
||||
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() );
|
||||
}
|
||||
}
|
||||
|
||||
return autoSaveOk;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <pgm_base.h>
|
||||
#include <msgpanel.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <kiface_i.h>
|
||||
#include <kiway.h>
|
||||
#include <kiway_player.h>
|
||||
#include <trace_helpers.h>
|
||||
|
@ -783,10 +784,13 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool addToHistory,
|
|||
return false;
|
||||
}
|
||||
|
||||
if( !Kiface().IsSingle() )
|
||||
{
|
||||
WX_STRING_REPORTER backupReporter( &upperTxt );
|
||||
|
||||
if( GetSettingsManager()->TriggerBackupIfNeeded( backupReporter ) )
|
||||
upperTxt.clear();
|
||||
}
|
||||
|
||||
GetBoard()->SetFileName( pcbFileName.GetFullPath() );
|
||||
UpdateTitle();
|
||||
|
@ -904,8 +908,11 @@ bool PCB_EDIT_FRAME::doAutoSave()
|
|||
UpdateTitle();
|
||||
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() );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue