summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divepicturewidget.cpp3
-rw-r--r--qt-models/divepicturemodel.cpp2
2 files changed, 1 insertions, 4 deletions
diff --git a/desktop-widgets/divepicturewidget.cpp b/desktop-widgets/divepicturewidget.cpp
index 55ae77202..7a9ae2484 100644
--- a/desktop-widgets/divepicturewidget.cpp
+++ b/desktop-widgets/divepicturewidget.cpp
@@ -32,7 +32,6 @@ void DivePictureWidget::mousePressEvent(QMouseEvent *event)
if (event->button() == Qt::LeftButton && event->modifiers() == Qt::NoModifier) {
QModelIndex index = indexAt(event->pos());
QString filename = model()->data(index, Qt::DisplayPropertyRole).toString();
- int diveId = model()->data(index, Qt::UserRole).toInt();
if (!filename.isEmpty()) {
int dim = lrint(defaultIconMetrics().sz_pic * 0.2);
@@ -42,7 +41,7 @@ void DivePictureWidget::mousePressEvent(QMouseEvent *event)
QByteArray itemData;
QDataStream dataStream(&itemData, QIODevice::WriteOnly);
- dataStream << filename << diveId;
+ dataStream << filename;
QMimeData *mimeData = new QMimeData;
mimeData->setData("application/x-subsurfaceimagedrop", itemData);
diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp
index e50c51744..6272935de 100644
--- a/qt-models/divepicturemodel.cpp
+++ b/qt-models/divepicturemodel.cpp
@@ -97,8 +97,6 @@ QVariant DivePictureModel::data(const QModelIndex &index, int role) const
return QFileInfo(QString::fromStdString(entry.filename)).fileName();
case Qt::DisplayPropertyRole:
return QFileInfo(QString::fromStdString(entry.filename)).filePath();
- case Qt::UserRole:
- return entry.diveId;
case Qt::UserRole + 1:
return entry.offsetSeconds;
case Qt::UserRole + 2: