Icon-O-Matic: Forget fMessageAfterSave when FilePanel was cancelled.

fMessageAfterSave capture what was to be done after a file panel was
used. For example, picking up quitting the app after the user saved
unsaved changes. The bug was that when trying to quit IOM, deciding to
save, but then cancelling the file panel, the quitting stopped (as expected).
But then the next time the document was saved, IOM quit unexpectedly.
This commit is contained in:
Stephan Aßmus 2013-12-31 10:28:47 +01:00
parent 852730f036
commit f31a2f68cc

View File

@ -344,6 +344,12 @@ MainWindow::MessageReceived(BMessage* message)
}
break;
}
case B_CANCEL:
// FilePanel was canceled, do not execute the fMessageAfterSave
// next time a file panel is used, in case it was set!
delete fMessageAfterSave;
fMessageAfterSave = NULL;
break;
case MSG_UNDO:
fDocument->CommandStack()->Undo();