From 5a2e40c3f519ae138c6331499687c7f80321dff7 Mon Sep 17 00:00:00 2001 From: Heewa Barfchin Date: Wed, 12 May 2021 22:07:44 -0400 Subject: [PATCH] Fix app quitting after failed save. Fixes #4098 Return `false` from Document::save() to properly communicate the failure, which the app-quit process already handles by aborting. --- src/Gui/Document.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index 16c4fa5836..534a02c951 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -1161,6 +1161,7 @@ bool Document::save(void) catch (const Base::Exception& e) { QMessageBox::critical(getMainWindow(), QObject::tr("Saving document failed"), QString::fromLatin1(e.what())); + return false; } return true; }