Also load extensions when creating a new database

Also load the default extensions when creating a new database.

When opening a database load the extensions before reading the structure
and the pragmas because the extensions could affect those.
This commit is contained in:
Martin Kleusberg
2013-05-04 21:27:36 +02:00
parent 0de7ff8564
commit 65b1adf845

View File

@@ -121,8 +121,6 @@ void MainWindow::init()
ui->editLogUser->setFont(font);
}
//***********************************************************
//*** Open File
void MainWindow::fileOpen(const QString & fileName)
{
QString wFile = fileName;
@@ -144,11 +142,11 @@ void MainWindow::fileOpen(const QString & fileName)
QString err = tr("An error occurred: %1").arg(db.lastErrorMessage);
QMessageBox::warning(this, QApplication::applicationName(), err);
}
loadExtensionsFromSettings();
populateStructure();
resetBrowser();
if(ui->mainTab->currentIndex() == 2)
loadPragmas();
loadExtensionsFromSettings();
}
}
@@ -167,6 +165,7 @@ void MainWindow::fileNew()
db.create(fileName);
setCurrentFile(fileName);
statusEncodingLabel->setText(db.getPragma("encoding"));
loadExtensionsFromSettings();
populateStructure();
resetBrowser();
createTable();