Update the recordset label in the Browse tab after closing a DB

Reset the recordset label in the Browse Data tab of the main window
after closing a DB file.
See issue #44.
This commit is contained in:
Martin Kleusberg
2014-04-22 22:21:46 +02:00
parent a7110ea0fc
commit d1ed2d151f

View File

@@ -361,6 +361,14 @@ void MainWindow::fileClose()
resetBrowser();
populateStructure();
loadPragmas();
// Delete the model for the Browse tab and create a new one
delete m_browseTableModel;
m_browseTableModel = new SqliteTableModel(this, &db, PreferencesDialog::getSettingsValue("db", "prefetchsize").toInt());
// Manually update the recordset label inside the Browse tab now
setRecordsetLabel();
activateFields(false);
ui->buttonLogClear->click();
for(int i=ui->tabSqlAreas->count()-1;i>=0;i--)