From 9b415eb3659e96645e4d91c5f2895aaa09abdc65 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Mon, 21 Aug 2006 13:11:45 +0000 Subject: [PATCH] Simplify. --- stepmania/src/ScreenEdit.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 0f28b3f621..d8f258f9b3 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2791,23 +2791,20 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns m_CurrentAction = c; // copy edit into current Steps - Song* pSong = GAMESTATE->m_pCurSong; - Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; - ASSERT( pSteps ); - - pSteps->SetNoteData( m_NoteDataEdit ); - pSteps->CalculateRadarValues( pSong->m_fMusicLengthSeconds ); + m_pSteps->SetNoteData( m_NoteDataEdit ); switch( EDIT_MODE.GetValue() ) { DEFAULT_FAIL( EDIT_MODE.GetValue() ); case EditMode_Home: { - ASSERT( pSteps->IsAnEdit() ); + ASSERT( m_pSteps->IsAnEdit() ); NotesWriterSM w; RString sError; - if( !w.WriteEditFileToMachine(pSong,pSteps,sError) ) + + m_pSteps->CalculateRadarValues( m_pSong->m_fMusicLengthSeconds ); + if( !w.WriteEditFileToMachine(m_pSong, m_pSteps, sError) ) { ScreenPrompt::Prompt( SM_None, sError ); break; @@ -2836,7 +2833,8 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns break; case EditMode_Full: { - pSong->Save(); + // This will recalculate radar values. + m_pSong->Save(); SCREENMAN->ZeroNextUpdate(); HandleScreenMessage( SM_SaveSuccessful );