Fix SongManager::Invalidate. Call it from places it is needed:
ScreenEdit::RevertFromDisk, ScreenEdit's Save routine, and ScreenEditMenu's Delete Steps routine. This fixes the bug where deleting a step chart sometimes causes interesting behavior but usually just causes a CTD next time you run Oni mode. It also makes sure data precalculated from the songs is correctly recalculated when ScreenEdit changes a song.
This commit is contained in:
@@ -74,6 +74,7 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
Steps* pStepsToDelete = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
bool bSaveSong = !pStepsToDelete->WasLoadedFromProfile();
|
||||
pSong->DeleteSteps( pStepsToDelete );
|
||||
SONGMAN->Invalidate( pSong );
|
||||
|
||||
/* Only save to the main .SM file if the steps we're deleting were loaded
|
||||
* from it. */
|
||||
|
||||
Reference in New Issue
Block a user