mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue