From fe8149ee8acb8815a15c49869ea282ed6792f038 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 16 Jun 2012 08:26:20 +0200 Subject: [PATCH] * Fixed sorting by score. --- src/libtomahawk/playlist/PlayableProxyModel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libtomahawk/playlist/PlayableProxyModel.cpp b/src/libtomahawk/playlist/PlayableProxyModel.cpp index 55fa4ba60..25e7e112b 100644 --- a/src/libtomahawk/playlist/PlayableProxyModel.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModel.cpp @@ -331,6 +331,13 @@ PlayableProxyModel::lessThan( int column, const Tomahawk::query_ptr& q1, const T return size1 < size2; } + else if ( column == PlayableModel::Score ) // sort by file score + { + if ( score1 == score2 ) + return id1 < id2; + + return score1 < score2; + } else if ( column == PlayableModel::AlbumPos ) // sort by album pos { if ( discnumber1 != discnumber2 )