Two different pieces of code in the editor were initializing a "new" song,

and they were both being triggered.  Only do it in the ctor, since we need
the information that's being initialized elsewhere in the editor.
This commit is contained in:
Glenn Maynard
2002-08-24 08:28:44 +00:00
parent 79bc58aedd
commit 30dd7ab9b2
+5 -1
View File
@@ -178,6 +178,8 @@ ScreenEdit::ScreenEdit()
// want to extract the NotesType for a (NEW) sequence. // want to extract the NotesType for a (NEW) sequence.
m_pSong->m_apNotes.Add( m_pNotes ); m_pSong->m_apNotes.Add( m_pNotes );
GAMESTATE->m_pCurNotes[PLAYER_1] = m_pNotes;
} }
NoteData noteData; NoteData noteData;
@@ -580,6 +582,8 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
Song* pSong = GAMESTATE->m_pCurSong; Song* pSong = GAMESTATE->m_pCurSong;
Notes* pNotes = GAMESTATE->m_pCurNotes[PLAYER_1]; Notes* pNotes = GAMESTATE->m_pCurNotes[PLAYER_1];
ASSERT( pNotes );
/*
if( pNotes == NULL ) if( pNotes == NULL )
{ {
// allocate a new Notes // allocate a new Notes
@@ -589,7 +593,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
pNotes->m_sDescription = "Untitled"; pNotes->m_sDescription = "Untitled";
pNotes->m_iMeter = 1; pNotes->m_iMeter = 1;
} }
*/
pNotes->SetNoteData( (NoteData*)&m_NoteFieldEdit ); pNotes->SetNoteData( (NoteData*)&m_NoteFieldEdit );
switch( DeviceI.button ) switch( DeviceI.button )
{ {