Ignore drop event in album cover manager

Fixes strange case where albums are duplicated by drag/drop.
This commit is contained in:
Jonas Kvinge 2021-03-07 22:59:08 +01:00
parent 69032db3c3
commit e63859442a
2 changed files with 1 additions and 12 deletions

View File

@ -73,14 +73,3 @@ QMimeData *AlbumCoverManagerList::mimeData(const QList<QListWidgetItem*> items)
return mime_data;
}
void AlbumCoverManagerList::dropEvent(QDropEvent *e) {
// Set movement to Static just for this dropEvent so the user can't move the album covers.
// If it's set to Static all the time then the user can't even drag to the playlist
QListWidget::Movement old_movement = movement();
setMovement(QListWidget::Static);
QListWidget::dropEvent(e);
setMovement(old_movement);
}

View File

@ -50,7 +50,7 @@ class AlbumCoverManagerList : public QListWidget {
QMimeData *mimeData(const QList<QListWidgetItem*> items) const override;
#endif
void dropEvent(QDropEvent *event) override;
void dropEvent(QDropEvent*) override {}
private:
AlbumCoverManager *manager_;