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()
|
ScreenEdit::~ScreenEdit()
|
||||||
{
|
{
|
||||||
|
// UGLY: Don't delete the Song's steps.
|
||||||
|
m_songLastSave.DetachSteps();
|
||||||
|
|
||||||
LOG->Trace( "ScreenEdit::~ScreenEdit()" );
|
LOG->Trace( "ScreenEdit::~ScreenEdit()" );
|
||||||
m_soundMusic.StopPlaying();
|
m_soundMusic.StopPlaying();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,13 @@ Song::~Song()
|
|||||||
// that all pointers to this Song and its Steps are invalidated.
|
// 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. */
|
/* Reset to an empty song. */
|
||||||
void Song::Reset()
|
void Song::Reset()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public:
|
|||||||
Song();
|
Song();
|
||||||
~Song();
|
~Song();
|
||||||
void Reset();
|
void Reset();
|
||||||
|
void DetachSteps();
|
||||||
|
|
||||||
NotesLoader *MakeLoader( CString sDir ) const;
|
NotesLoader *MakeLoader( CString sDir ) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user