don't delete current Song's steps through the LastSaved when destructing ScreenEdit

This commit is contained in:
Chris Danford
2005-03-08 21:39:01 +00:00
parent dc9e8e23ff
commit 21ae0fc658
3 changed files with 11 additions and 0 deletions
+3
View File
@@ -613,6 +613,9 @@ void ScreenEdit::Init()
ScreenEdit::~ScreenEdit()
{
// UGLY: Don't delete the Song's steps.
m_songLastSave.DetachSteps();
LOG->Trace( "ScreenEdit::~ScreenEdit()" );
m_soundMusic.StopPlaying();
}
+7
View File
@@ -85,6 +85,13 @@ Song::~Song()
// that all pointers to this Song and its Steps are invalidated.
}
void Song::DetachSteps()
{
m_vpSteps.clear();
FOREACH_StepsType( st )
m_vpStepsByType[st].clear();
}
/* Reset to an empty song. */
void Song::Reset()
{
+1
View File
@@ -59,6 +59,7 @@ public:
Song();
~Song();
void Reset();
void DetachSteps();
NotesLoader *MakeLoader( CString sDir ) const;