From 65b1adf845a822dee06fd7be99f61d264fd91331 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Sat, 4 May 2013 21:27:36 +0200 Subject: [PATCH] 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. --- src/MainWindow.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index a06877da..e54b11bd 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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();