diff --git a/src/Mod/Drawing/Gui/DrawingView.cpp b/src/Mod/Drawing/Gui/DrawingView.cpp
index 6e9923a51..bb3ce9e01 100644
--- a/src/Mod/Drawing/Gui/DrawingView.cpp
+++ b/src/Mod/Drawing/Gui/DrawingView.cpp
@@ -58,6 +58,7 @@
#include
#include
#include
+#include
#include
#include
@@ -312,6 +313,20 @@ bool DrawingView::onMsg(const char* pMsg, const char** ppReturn)
viewAll();
return true;
}
+ else if (strcmp("Save",pMsg) == 0) {
+ Gui::Document *doc = getGuiDocument();
+ if (doc) {
+ doc->save();
+ return true;
+ }
+ }
+ else if (strcmp("SaveAs",pMsg) == 0) {
+ Gui::Document *doc = getGuiDocument();
+ if (doc) {
+ doc->saveAs();
+ return true;
+ }
+ }
return false;
}
@@ -319,12 +334,16 @@ bool DrawingView::onHasMsg(const char* pMsg) const
{
if (strcmp("ViewFit",pMsg) == 0)
return true;
+ else if (strcmp("Save",pMsg) == 0)
+ return getGuiDocument() != 0;
+ else if (strcmp("SaveAs",pMsg) == 0)
+ return getGuiDocument() != 0;
else if (strcmp("Print",pMsg) == 0)
- return true;
+ return true;
else if (strcmp("PrintPreview",pMsg) == 0)
- return true;
+ return true;
else if (strcmp("PrintPdf",pMsg) == 0)
- return true;
+ return true;
return false;
}