From 8eb19e2c1b01fd18a5e794a6ea4cbb5e50dcd900 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Jun 2010 16:05:30 -0500 Subject: [PATCH] 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. --- src/MusicWheel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index 3f2bba4b30..9e04a454cc 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -334,6 +334,15 @@ void MusicWheel::GetSongList( vector &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;