diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-08 10:15:34 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-08 07:41:17 -0800 |
commit | f7abde84afb9e8ae984746a91dc802759d8d82f6 (patch) | |
tree | 07c1454eb1756a2962acd15c267dee66cd406582 /qt-ui/downloadfromdivecomputer.cpp | |
parent | 9ee615bca3ee27f8e96c0a4e95737a76af0e8b7a (diff) | |
download | subsurface-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.cpp | 7 |
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(); } |