Rework Pack.ini Sort Title sorting logic to better handle duplicate sort titles (falls back on group name)

This commit is contained in:
Crash Cringle
2025-03-08 07:08:55 -05:00
committed by teejusb
parent 34de803f7b
commit cd73c169ab
3 changed files with 38 additions and 17 deletions
+4 -1
View File
@@ -728,6 +728,9 @@ void MusicWheel::BuildWheelItemDatas( std::vector<MusicWheelItemData *> &arrayWh
/* We're using sections, so use the section name as the top-level sort. */
switch( so )
{
case SORT_GROUP:
SongUtil::SortSongPointerArrayByGroup(arraySongs);
break;
case SORT_METER:
case SORT_PREFERRED:
case SORT_TOP_GRADES:
@@ -799,7 +802,7 @@ void MusicWheel::BuildWheelItemDatas( std::vector<MusicWheelItemData *> &arrayWh
unsigned j;
for( j=i; j < arraySongs.size(); j++ )
{
if( SongUtil::GetSectionNameFromSongAndSort( arraySongs[j], so ) != sThisSection )
if( SONGMAN->GetGroup(arraySongs[j])->GetGroupName() != sThisSection )
break;
}
iSectionCount = j-i;