don't SetSavedToDisk, etc. if the save failed

This commit is contained in:
Glenn Maynard
2005-12-06 20:40:09 +00:00
parent 3d5403dfd9
commit ab9526a9ed
+7 -4
View File
@@ -2551,14 +2551,17 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
{
ASSERT( pSteps->IsAnEdit() );
pSteps->SetSavedToDisk( true );
pSteps->SetLoadedFromProfile( ProfileSlot_Machine );
// XXX show error
NotesWriterSM w;
if( !w.WriteEditFileToMachine(pSong, pSteps) )
break;
pSteps->SetSavedToDisk( true );
CopyToLastSave();
ClearUndo();
NotesWriterSM w;
w.WriteEditFileToMachine( pSong, pSteps );
SCREENMAN->ZeroNextUpdate();
// TODO: make localizable