mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user