Fix an issue (#151) with [MusicWheel] UseSectionsWithPreferredGroup=false and setting a group via gamecommand. This situation will now produce only the files in the preferred group.

This commit is contained in:
AJ Kelly
2010-06-29 16:05:30 -05:00
parent 634240e65c
commit 8eb19e2c1b
+9
View File
@@ -334,6 +334,15 @@ void MusicWheel::GetSongList( vector<Song*> &arraySongs, SortOrder so )
case SORT_POPULARITY:
SONGMAN->GetPopularSongs();
break;
case SORT_GROUP:
// if we're not using sections with a preferred song group, and there
// is a group to load, only load those songs. -aj
if(GAMESTATE->m_sPreferredSongGroup != GROUP_ALL && !USE_SECTIONS_WITH_PREFERRED_GROUP )
{
apAllSongs = SONGMAN->GetSongs(GAMESTATE->m_sPreferredSongGroup);
break;
}
// otherwise fall through
default:
apAllSongs = SONGMAN->GetAllSongs();
break;