summaryrefslogtreecommitdiffstats
path: root/qt-models/divepicturemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/divepicturemodel.cpp')
-rw-r--r--qt-models/divepicturemodel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp
index 0aaf8f868..c881ce5bf 100644
--- a/qt-models/divepicturemodel.cpp
+++ b/qt-models/divepicturemodel.cpp
@@ -96,14 +96,16 @@ QVariant DivePictureModel::data(const QModelIndex &index, int role) const
break;
case Qt::DisplayPropertyRole:
ret = QFileInfo(entry.filename).filePath();
+ break;
+ case Qt::UserRole:
+ ret = entry.diveId;
+ break;
}
} else if (index.column() == 1) {
switch (role) {
- case Qt::UserRole:
- ret = QVariant::fromValue(entry.offsetSeconds);
- break;
case Qt::DisplayRole:
ret = entry.filename;
+ break;
}
}
return ret;