mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Do not open a new SQL tab when a DB file is open or created unless there
is not any yet. See issue #1706
This commit is contained in:
@@ -517,7 +517,8 @@ bool MainWindow::fileOpen(const QString& fileName, bool openFromProject, bool re
|
||||
if(!currentProjectFilename.isEmpty())
|
||||
isProjectModified = true;
|
||||
}
|
||||
openSqlTab(true);
|
||||
if(ui->tabSqlAreas->count() == 0)
|
||||
openSqlTab(true);
|
||||
if(ui->mainTab->currentWidget() == ui->browser)
|
||||
populateTable();
|
||||
else if(ui->mainTab->currentWidget() == ui->pragmas)
|
||||
@@ -551,7 +552,8 @@ void MainWindow::fileNew()
|
||||
statusEncryptionLabel->setVisible(false);
|
||||
statusReadOnlyLabel->setVisible(false);
|
||||
populateTable();
|
||||
openSqlTab(true);
|
||||
if(ui->tabSqlAreas->count() == 0)
|
||||
openSqlTab(true);
|
||||
createTable();
|
||||
}
|
||||
}
|
||||
@@ -564,7 +566,8 @@ void MainWindow::fileNewInMemoryDatabase()
|
||||
statusEncryptionLabel->setVisible(false);
|
||||
statusReadOnlyLabel->setVisible(false);
|
||||
populateTable();
|
||||
openSqlTab(true);
|
||||
if(ui->tabSqlAreas->count() == 0)
|
||||
openSqlTab(true);
|
||||
createTable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user