Fix the ordering of tracks in the library view, again

This commit is contained in:
David Sansome 2010-07-31 15:00:31 +00:00
parent a236861dfa
commit 5a1fe772ac
1 changed files with 1 additions and 1 deletions

View File

@ -681,7 +681,7 @@ QString LibraryModel::SortTextForYear(int year) const {
}
QString LibraryModel::SortTextForSong(const Song& song) const {
QString ret = QString::number(song.disc() * 1000 + song.track());
QString ret = QString::number(qMax(0, song.disc()) * 1000 + qMax(0, song.track()));
ret.prepend(QString("0").repeated(6 - ret.length()));
ret.append(song.filename());
return ret;