From a13cbcaafb78aecab415eff7fa4f86d175bc2788 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 29 Dec 2005 04:01:54 +0000 Subject: [PATCH] simplify edit_stop --- stepmania/src/ScreenEdit.cpp | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index f067eba3e7..6be9566a41 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2677,27 +2677,13 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns ); break; case edit_stop: - { - unsigned i; - for( i=0; im_Timing.m_StopSegments.size(); i++ ) - { - // XXX - if( m_pSong->m_Timing.m_StopSegments[i].m_iStartRow == BeatToNoteRow(GAMESTATE->m_fSongBeat) ) - break; - } - - float fStopSeconds = 0; - if ( i == m_pSong->m_Timing.m_StopSegments.size() ) - fStopSeconds = m_pSong->m_Timing.m_StopSegments[i].m_fStopSeconds; - - ScreenTextEntry::TextEntry( - SM_BackFromStopChange, - ENTER_STOP_VALUE, - ssprintf( "%.4f", fStopSeconds ), - 10 - ); - break; - } + ScreenTextEntry::TextEntry( + SM_BackFromStopChange, + ENTER_STOP_VALUE, + ssprintf( "%.4f", m_pSong->m_Timing.GetStopAtRow( BeatToNoteRow(GAMESTATE->m_fSongBeat) ) ), + 10 + ); + break; case play_preview_music: PlayPreviewMusic(); break;