don't delete current Song's steps through the LastSaved when destructing ScreenEdit
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
Song();
|
||||
~Song();
|
||||
void Reset();
|
||||
void DetachSteps();
|
||||
|
||||
NotesLoader *MakeLoader( CString sDir ) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user