Also update schema when clicking the Refresh button in Browse Data tab

When clicking the Refresh button in the Browse Data tab only the table
contents were refreshed, not the database schema. Hitting F5 however
updated both schema and data. This commit make sure the schema is
updated in both cases.

See issue #2325.
This commit is contained in:
Martin Kleusberg
2020-07-09 22:04:30 +02:00
parent cf9fc5c25e
commit a09df5bc0a
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -754,7 +754,6 @@ void MainWindow::refresh()
db.updateSchema();
} else if (currentTab == ui->browser) {
// Refresh the schema and reload the current table
db.updateSchema();
populateTable();
} else if (currentTab == ui->pragmas) {
// Reload pragma values
@@ -2065,6 +2064,8 @@ void MainWindow::loadExtension()
void MainWindow::reloadSettings()
{
Application::reloadSettings();
// Set data browser font
ui->tableBrowser->reloadSettings();
+3
View File
@@ -423,6 +423,9 @@ void TableBrowser::updateTable()
return;
}
// Update the schema first
db->updateSchema();
// Reset the minimum width of the vertical header which could have been modified in updateFilter
// or in headerClicked.
ui->dataTable->verticalHeader()->setMinimumWidth(0);