Fix a weird bug when removing the last-but-one playlist
This commit is contained in:
parent
d921b7e4e7
commit
9baa1f74c7
@ -79,8 +79,10 @@ void PlaylistView::SetItemDelegates(LibraryBackend* backend) {
|
||||
}
|
||||
|
||||
void PlaylistView::setModel(QAbstractItemModel *m) {
|
||||
if (model())
|
||||
disconnect(model(), 0, this, 0);
|
||||
if (model()) {
|
||||
disconnect(model(), SIGNAL(CurrentSongChanged(Song)),
|
||||
this, SLOT(MaybeAutoscroll()));
|
||||
}
|
||||
|
||||
QTreeView::setModel(m);
|
||||
LoadGeometry();
|
||||
|
Loading…
x
Reference in New Issue
Block a user