Ignore drop event in album cover manager
Fixes strange case where albums are duplicated by drag/drop.
This commit is contained in:
@@ -73,14 +73,3 @@ QMimeData *AlbumCoverManagerList::mimeData(const QList<QListWidgetItem*> items)
|
|||||||
return mime_data;
|
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);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class AlbumCoverManagerList : public QListWidget {
|
|||||||
QMimeData *mimeData(const QList<QListWidgetItem*> items) const override;
|
QMimeData *mimeData(const QList<QListWidgetItem*> items) const override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void dropEvent(QDropEvent *event) override;
|
void dropEvent(QDropEvent*) override {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AlbumCoverManager *manager_;
|
AlbumCoverManager *manager_;
|
||||||
|
|||||||
Reference in New Issue
Block a user