mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user