Fix Level and Preferred Sorts to account for a song being in multiple sections

This commit properly returns you to the correct pack when leaving a folder or returning from another screen.
This is achieved by returning you to your last open section. Previously behavior searched for the first instance of the song in your sort and put you in that section.
This commit is contained in:
Crash Cringle
2024-07-07 16:14:07 -07:00
committed by teejusb
parent 0447d9ae58
commit 667d27b361
4 changed files with 35 additions and 9 deletions
+2
View File
@@ -290,12 +290,14 @@ bool WheelBase::Select() // return true if this selection can end the screen
RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText;
if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded
{
GAMESTATE->sLastOpenSection = sThisItemSectionName; // remember this section
SetOpenSection( "" ); // collapse it
m_soundCollapse.Play(true);
}
else // already collapsed
{
SetOpenSection( sThisItemSectionName ); // expand it
GAMESTATE->sLastOpenSection = sThisItemSectionName; // remember this section
m_soundExpand.Play(true);
}
}