From f31a2f68cc708c0bca626ae6acb2cdd0086fc241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 31 Dec 2013 10:28:47 +0100 Subject: [PATCH] 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. --- src/apps/icon-o-matic/MainWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apps/icon-o-matic/MainWindow.cpp b/src/apps/icon-o-matic/MainWindow.cpp index ee5a4ce07d..244dc0c12c 100644 --- a/src/apps/icon-o-matic/MainWindow.cpp +++ b/src/apps/icon-o-matic/MainWindow.cpp @@ -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();