mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Don't refresh Browse Data tab if it isn't visible anyway
This doesn't reduce the number of populateTable calls (well, obviously) but it reduces the cost of some of the more useless ones a lot.
This commit is contained in:
@@ -381,6 +381,10 @@ void MainWindow::populateStructure()
|
||||
|
||||
void MainWindow::populateTable(QString tablename)
|
||||
{
|
||||
// Early exit if the Browse Data tab isn't visible as there is no need to update it in this case
|
||||
if(ui->mainTab->currentIndex() != 1)
|
||||
return;
|
||||
|
||||
// Remove the model-view link if the table name is empty in order to remove any data from the view
|
||||
if(ui->comboBrowseTable->model()->rowCount(ui->comboBrowseTable->rootModelIndex()) == 0 && tablename.isEmpty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user