Ignore drop event in album cover manager
Fixes strange case where albums are duplicated by drag/drop.
This commit is contained in:
parent
69032db3c3
commit
e63859442a
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user