1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-02-26 04:43:06 +01:00

fix grammar when only 1 non-artist filter

This commit is contained in:
Leo Franchi 2011-02-06 22:53:49 -05:00
parent 48deb06741
commit c76cbf1e72

View File

@ -384,8 +384,9 @@ EchonestGenerator::sentenceSummary()
/// end case: if this is the last AND there is not a sorting filter (so this is the real last one)
const bool last = ( i == allcontrols.size() - 1 && sorting.isNull() );
QString prefix, suffix;
if( last ) {
prefix = "and ";
if( last ) { // only if there is not just 1
if( !( artists.isEmpty() && allcontrols.size() == 1 ) )
prefix = "and ";
suffix = ".";
} else
suffix = ", ";