aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/downloadfromdivecomputer.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-08 10:15:34 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 07:41:17 -0800
commitf7abde84afb9e8ae984746a91dc802759d8d82f6 (patch)
tree07c1454eb1756a2962acd15c267dee66cd406582 /qt-ui/downloadfromdivecomputer.cpp
parent9ee615bca3ee27f8e96c0a4e95737a76af0e8b7a (diff)
downloadsubsurface-f7abde84afb9e8ae984746a91dc802759d8d82f6.tar.gz
Dive d/l selection UI: setImportedDivesIndexes implementation
Here we list in the model what are our dives, inside the dive_table. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index cc695a7de..6a1650e3c 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -521,5 +521,10 @@ QVariant DiveImportedModel::data(const QModelIndex& model, int role) const
void DiveImportedModel::setImportedDivesIndexes(int first, int last)
{
-
+ beginRemoveRows(QModelIndex(), 0, lastIndex - firstIndex);
+ endRemoveRows();
+ beginInsertRows(QModelIndex(), 0, last - first);
+ lastIndex = last;
+ firstIndex = first;
+ endInsertRows();
}