SetSavedToDisk in Save(), not in SM_SaveSuccessful. When we save the
whole file, all steps are saved to disk; we were only marking the
active steps. This sequence would cause steps to be wrongly deleted:
1: create easy and medium steps for one steps type; save
2: on another steps type, edit easy steps which were autogenned from the above
change the steps
3: f6 to change to medium steps steps which were autogenned from the above
4: menu -> save
This will save all data, but only medium will be marked saved to disk.
5: f5 to change back to easy steps
6: menu -> exit
This will delete the easy steps, because they were not marked saved to disk.
This commit is contained in:
@@ -2551,7 +2551,6 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
||||
else if( SM == SM_SaveSuccessful )
|
||||
{
|
||||
LOG->Trace( "Save successful." );
|
||||
m_pSteps->SetSavedToDisk( true );
|
||||
CopyToLastSave();
|
||||
SetDirty( false );
|
||||
SONGMAN->Invalidate( GAMESTATE->m_pCurSong );
|
||||
@@ -2806,6 +2805,8 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
|
||||
break;
|
||||
}
|
||||
|
||||
m_pSteps->SetSavedToDisk( true );
|
||||
|
||||
// HACK: clear undo, so "exit" below knows we don't need to save.
|
||||
// This only works because important non-steps data can't be changed in
|
||||
// home mode (BPMs, stops).
|
||||
|
||||
Reference in New Issue
Block a user