Move LastOpenSection declaration outside of if/else, add clarity to comment
This commit is contained in:
+3
-2
@@ -288,16 +288,17 @@ bool WheelBase::Select() // return true if this selection can end the screen
|
|||||||
case WheelItemDataType_Section:
|
case WheelItemDataType_Section:
|
||||||
{
|
{
|
||||||
RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText;
|
RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText;
|
||||||
|
// Keep track of the open section so that we can restore it
|
||||||
|
// when navigating back to ScreenSelectMusic.
|
||||||
|
GAMESTATE->sLastOpenSection = sThisItemSectionName;
|
||||||
if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded
|
if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded
|
||||||
{
|
{
|
||||||
GAMESTATE->sLastOpenSection = sThisItemSectionName; // remember this section
|
|
||||||
SetOpenSection( "" ); // collapse it
|
SetOpenSection( "" ); // collapse it
|
||||||
m_soundCollapse.Play(true);
|
m_soundCollapse.Play(true);
|
||||||
}
|
}
|
||||||
else // already collapsed
|
else // already collapsed
|
||||||
{
|
{
|
||||||
SetOpenSection( sThisItemSectionName ); // expand it
|
SetOpenSection( sThisItemSectionName ); // expand it
|
||||||
GAMESTATE->sLastOpenSection = sThisItemSectionName; // remember this section
|
|
||||||
m_soundExpand.Play(true);
|
m_soundExpand.Play(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user