Don't override project file settings right after loading them

This fixes a bug which was introduced during the SQLCipher development
and which caused some settings loaded from a project file to be loaded
but then replaced by the default values which were loaded right
afterwards.
This commit is contained in:
Martin Kleusberg
2014-11-06 16:56:08 +01:00
parent ea2512d538
commit fca39e9e1c

View File

@@ -209,6 +209,7 @@ bool MainWindow::fileOpen(const QString& fileName, bool dontAddToRecentFiles)
if(QFile::exists(wFile) )
{
fileClose();
// Try opening it as a project file first
if(loadProject(wFile))
{
@@ -223,17 +224,17 @@ bool MainWindow::fileOpen(const QString& fileName, bool dontAddToRecentFiles)
if(!dontAddToRecentFiles)
addToRecentFilesMenu(wFile);
openSqlTab(true);
loadExtensionsFromSettings();
populateStructure();
resetBrowser();
if(ui->mainTab->currentIndex() == 2)
loadPragmas();
retval = true;
} else {
QMessageBox::warning(this, qApp->applicationName(), tr("Invalid file format."));
return false;
}
}
loadExtensionsFromSettings();
populateStructure();
resetBrowser();
if(ui->mainTab->currentIndex() == 2)
loadPragmas();
}
return retval;