Dive d/l selection UI: fix the row count ranges
Yet another bug because the indices are inclusive. We need to start off with the last being smaller than first and we need to adjust the row count. It might be easier to just fix thing to make last be exclusive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
80af8e7fa2
commit
4d26e3a0cb
@ -527,7 +527,7 @@ void DownloadThread::run()
|
||||
}
|
||||
|
||||
DiveImportedModel::DiveImportedModel(QObject *o) : QAbstractTableModel(o),
|
||||
lastIndex(0),
|
||||
lastIndex(-1),
|
||||
firstIndex(0),
|
||||
checkStates(0)
|
||||
{
|
||||
@ -540,7 +540,7 @@ int DiveImportedModel::columnCount(const QModelIndex &model) const
|
||||
|
||||
int DiveImportedModel::rowCount(const QModelIndex &model) const
|
||||
{
|
||||
return lastIndex - firstIndex;
|
||||
return lastIndex - firstIndex + 1;
|
||||
}
|
||||
|
||||
QVariant DiveImportedModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user