mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Clear SQL log when closing a DB and close DB before opening a new one
Clear the SQL log when closing the associated DB file. Before opening a new database file make sure the last one is closed correctly.
This commit is contained in:
@@ -124,9 +124,10 @@ void MainWindow::fileOpen(const QString & fileName)
|
||||
"Choose a database file",
|
||||
defaultlocation);
|
||||
}
|
||||
if (QFile::exists(wFile) )
|
||||
if(QFile::exists(wFile) )
|
||||
{
|
||||
if (db.open(wFile))
|
||||
fileClose();
|
||||
if(db.open(wFile))
|
||||
{
|
||||
setCurrentFile(wFile);
|
||||
} else {
|
||||
@@ -287,6 +288,7 @@ void MainWindow::fileClose()
|
||||
populateStructure();
|
||||
loadPragmas();
|
||||
activateFields(false);
|
||||
logWin->clearLog();
|
||||
}
|
||||
|
||||
void MainWindow::fileExit()
|
||||
|
||||
Reference in New Issue
Block a user