Fix remove rows

This commit is contained in:
craig
2012-03-23 20:32:32 +00:00
committed by craig
parent 65cda97b56
commit 6c3fce45ea

View File

@@ -588,7 +588,7 @@ void PlaylistsModel::playlistInfoRetrieved(const QString &name, const QList<Song
if (pl->songs.count()>songs.count()) {
int toRemove=pl->songs.count()-songs.count();
beginRemoveRows(parent, pl->songs.count()-(toRemove+1), pl->songs.count()-1);
beginRemoveRows(parent, pl->songs.count()-toRemove, pl->songs.count()-1);
for (int i=0; i<toRemove; ++i) {
delete pl->songs.takeLast();
}