aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-09 12:21:20 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-09 12:42:09 -0800
commit4d26e3a0cbb57d9d0d80e68c783dbd69d5cca794 (patch)
treecf2345a756281eec443f0bc601a90efb3796f3a3 /qt-ui/downloadfromdivecomputer.cpp
parent80af8e7fa2946bd5b869689d626e9c6ebb4fefaf (diff)
downloadsubsurface-4d26e3a0cbb57d9d0d80e68c783dbd69d5cca794.tar.gz
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>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index c0c8e8b1c..5ac39ebf3 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -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