Stop some autosave crashes (#3841)
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "PluginView.h"
|
||||
#include "ProjectJournal.h"
|
||||
#include "ProjectNotes.h"
|
||||
#include "RemotePlugin.h"
|
||||
#include "SetupDialog.h"
|
||||
#include "SideBar.h"
|
||||
#include "SongEditor.h"
|
||||
@@ -1535,14 +1536,14 @@ void MainWindow::browseHelp()
|
||||
void MainWindow::autoSave()
|
||||
{
|
||||
if( !Engine::getSong()->isExporting() &&
|
||||
!Engine::getSong()->isLoadingProject() &&
|
||||
!RemotePluginBase::isMainThreadWaiting() &&
|
||||
!QApplication::mouseButtons() &&
|
||||
( ConfigManager::inst()->value( "ui",
|
||||
"enablerunningautosave" ).toInt() ||
|
||||
! Engine::getSong()->isPlaying() ) )
|
||||
( ConfigManager::inst()->value( "ui",
|
||||
"enablerunningautosave" ).toInt() ||
|
||||
! Engine::getSong()->isPlaying() ) )
|
||||
{
|
||||
AutoSaveThread * ast = new AutoSaveThread();
|
||||
connect( ast, SIGNAL( finished() ), ast, SLOT( deleteLater() ) );
|
||||
ast->start();
|
||||
Engine::getSong()->saveProjectFile(ConfigManager::inst()->recoveryFile());
|
||||
autoSaveTimerReset(); // Reset timer
|
||||
}
|
||||
else
|
||||
@@ -1554,11 +1555,3 @@ void MainWindow::autoSave()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AutoSaveThread::run()
|
||||
{
|
||||
Engine::getSong()->saveProjectFile(ConfigManager::inst()->recoveryFile());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user