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:
John Bauer
2006-11-13 17:07:42 +00:00
parent cf34d741ec
commit e15285ab55
4 changed files with 33 additions and 104 deletions
+1
View File
@@ -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. */