[sm130labels] Do not allow duplicate label names.

This commit is contained in:
Jason Felds
2011-04-05 14:18:29 -04:00
parent 48fd81c515
commit 5e61884941
3 changed files with 19 additions and 3 deletions
+2 -2
View File
@@ -2669,13 +2669,13 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
else if ( SM == SM_BackFromLabelChange )
{
RString sLabel = ScreenTextEntry::s_sLastAnswer;
if ( sLabel.length() > 0 )
if ( !m_pSong->m_Timing.DoesLabelExist(sLabel) )
{
sLabel.Replace("=", "_");
sLabel.Replace(",", "_");
m_pSong->m_Timing.SetLabelAtBeat( GAMESTATE->m_fSongBeat, sLabel );
SetDirty( true );
}
SetDirty( true );
}
else if ( SM == SM_BackFromWarpChange )
{