mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
media: don't send dive-id in drag&drop event
The profile-widget doesn't use that information anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e61641c79c
commit
0d06eb83d8
2 changed files with 1 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue