Fix a weird bug when removing the last-but-one playlist

This commit is contained in:
David Sansome 2010-05-22 14:28:37 +00:00
parent d921b7e4e7
commit 9baa1f74c7

View File

@ -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();