diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index e64c865ed4..9e681c0167 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -173,6 +173,7 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD, int // init and unhide type specific stuff switch( pWID->m_Type ) { + DEFAULT_FAIL( pWID->m_Type ); case TYPE_SECTION: case TYPE_COURSE: case TYPE_SORT: @@ -228,8 +229,13 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD, int m_textRoulette.SetText( THEME->GetString("MusicWheel","Portal") ); m_textRoulette.SetVisible( true ); break; + } - DEFAULT_FAIL( pWID->m_Type ); // invalid type + // Call "Set" so that elements can react to the change in song. + { + Message msg( "Set" ); + msg.SetParam( "Song", data->m_pSong ); + this->HandleMessage( msg ); } Actor *pBars[] = { m_sprBar, m_sprExpandedBar, m_sprSectionBar, m_sprModeBar, m_sprSortBar, m_sprSongBar, NULL }; @@ -324,7 +330,7 @@ void MusicWheelItem::HandleMessage( const Message &msg ) RefreshGrades(); } - Actor::HandleMessage( msg ); + WheelItemBase::HandleMessage( msg ); } /* diff --git a/stepmania/src/TextBanner.cpp b/stepmania/src/TextBanner.cpp index 28bfb29430..d1446fe267 100644 --- a/stepmania/src/TextBanner.cpp +++ b/stepmania/src/TextBanner.cpp @@ -92,14 +92,12 @@ void TextBanner::LoadFromString( const RString &sDisplayArtist, const RString &sTranslitArtist ) { LoadInternal( - NULL, sDisplayTitle, sTranslitTitle, sDisplaySubTitle, sTranslitSubTitle, sDisplayArtist, sTranslitArtist ); } void TextBanner::LoadInternal( - Song *pSong, const RString &sDisplayTitle, const RString &sTranslitTitle, const RString &sDisplaySubTitle, const RString &sTranslitSubTitle, const RString &sDisplayArtist, const RString &sTranslitArtist ) @@ -110,9 +108,7 @@ void TextBanner::LoadInternal( m_textSubTitle.SetText( sDisplaySubTitle, sTranslitSubTitle ); m_textArtist.SetText( sDisplayArtist, sTranslitArtist ); - Message msg( "Set" ); - msg.SetParam( "Song", pSong ); - this->HandleMessage( msg ); + // Set command is called by parent on the whole music wheel item } void TextBanner::LoadFromSong( Song *pSong ) @@ -127,7 +123,6 @@ void TextBanner::LoadFromSong( Song *pSong ) RString sTranslitArtist = pSong ? m_sArtistPrependString + pSong->GetTranslitArtist() : RString(""); LoadInternal( - pSong, sDisplayTitle, sTranslitTitle, sDisplaySubTitle, sTranslitSubTitle, sDisplayArtist, sTranslitArtist ); diff --git a/stepmania/src/TextBanner.h b/stepmania/src/TextBanner.h index 92eac13408..dc62b31d93 100644 --- a/stepmania/src/TextBanner.h +++ b/stepmania/src/TextBanner.h @@ -28,7 +28,6 @@ public: private: void LoadInternal( - Song *pSong, const RString &sDisplayTitle, const RString &sTranslitTitle, const RString &sDisplaySubTitle, const RString &sTranslitSubTitle, const RString &sDisplayArtist, const RString &sTranslitArtist );