From f7abde84afb9e8ae984746a91dc802759d8d82f6 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 8 Jan 2015 10:15:34 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/downloadfromdivecomputer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); } -- cgit v1.2.3-70-g09d2