Fix bugged pagination (close #912)

This commit is contained in:
Vladislav Tronko
2016-12-23 21:01:33 +02:00
parent c34cd22f43
commit 70ff691f1a

View File

@@ -668,14 +668,10 @@ void MainWindow::setRecordsetLabel()
{
// Get all the numbers, i.e. the number of the first row and the last row as well as the total number of rows
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;
int to = ui->dataTable->verticalHeader()->visualIndexAt(ui->dataTable->height()) - 1;
if (to == -2)
to = total;
}
// Update the validator of the goto row field
gotoValidator->setRange(0, total);