Originally, the AdjustSync class always saved to disk, even in edit mode.
In edit mode, though, AdjustSync should only save to memory, giving the user a chance to save later. This change adds a SongChanged message to the MessageManager. Making the ScreenEdit class listen to this message allows the AdjustSync class to mark a song as dirty rather than saving it to disk when in edit mode. R=steve chekoway
This commit is contained in:
@@ -763,6 +763,8 @@ void ScreenEdit::Init()
|
||||
|
||||
this->HandleScreenMessage( SM_UpdateTextInfo );
|
||||
m_bTextInfoNeedsUpdate = true;
|
||||
|
||||
SubscribeToMessage( Message_SongChanged );
|
||||
}
|
||||
|
||||
ScreenEdit::~ScreenEdit()
|
||||
@@ -2365,6 +2367,15 @@ void ScreenEdit::ScrollTo( float fDestinationBeat )
|
||||
m_soundChangeLine.Play();
|
||||
}
|
||||
|
||||
void ScreenEdit::HandleMessage( const RString &sMessage )
|
||||
{
|
||||
if( sMessage == MessageToString( Message_SongChanged ) )
|
||||
{
|
||||
SetDirty( true );
|
||||
}
|
||||
Screen::HandleMessage( sMessage );
|
||||
}
|
||||
|
||||
static LocalizedString SAVE_SUCCESSFUL ( "ScreenEdit", "Save successful." );
|
||||
|
||||
void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
Reference in New Issue
Block a user