Clear Browse Data paging label on database close

Before this, only the start index was being reset to 0, now it resets
all the indexes to 0 after closing a database.

This fixes #809
This commit is contained in:
Iulian Onofrei
2016-10-09 03:21:25 +03:00
parent 7b86b17788
commit 175a162d1a

View File

@@ -523,7 +523,7 @@ bool MainWindow::fileClose()
browseTableSettings.clear();
defaultBrowseTableEncoding = QString();
// Manually update the recordset label inside the Browse tab now
// Reset the recordset label inside the Browse tab now
setRecordsetLabel();
// Reset the plot dock model
@@ -679,8 +679,12 @@ void MainWindow::setRecordsetLabel()
int from = ui->dataTable->verticalHeader()->visualIndexAt(0) + 1;
int to = ui->dataTable->verticalHeader()->visualIndexAt(ui->dataTable->height()) - 1;
int total = m_browseTableModel->totalRowCount();
if(to == -2)
{
total = 0;
to = total;
}
// Update the validator of the goto row field
gotoValidator->setRange(0, total);