diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp
index f0f6d9abc..373ec7fa9 100644
--- a/src/Gui/ApplicationPy.cpp
+++ b/src/Gui/ApplicationPy.cpp
@@ -405,12 +405,15 @@ PyObject* Application::sExport(PyObject * /*self*/, PyObject *args,PyObject * /*
PyObject* Application::sSendActiveView(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
{
char *psCommandStr;
- if (!PyArg_ParseTuple(args, "s",&psCommandStr)) // convert args: Python->C
+ PyObject *suppress=Py_False;
+ if (!PyArg_ParseTuple(args, "s|O!",&psCommandStr,&PyBool_Type,&suppress)) // convert args: Python->C
return NULL; // NULL triggers exception
const char* ppReturn=0;
- if (!Instance->sendMsgToActiveView(psCommandStr,&ppReturn))
- Base::Console().Warning("Unknown view command: %s\n",psCommandStr);
+ if (!Instance->sendMsgToActiveView(psCommandStr,&ppReturn)) {
+ if (!PyObject_IsTrue(suppress))
+ Base::Console().Warning("Unknown view command: %s\n",psCommandStr);
+ }
// Print the return value to the output
if (ppReturn) {
diff --git a/src/Gui/DocumentPy.xml b/src/Gui/DocumentPy.xml
index da5795a6c..629a69ed4 100644
--- a/src/Gui/DocumentPy.xml
+++ b/src/Gui/DocumentPy.xml
@@ -106,5 +106,11 @@
-
+
+
+ Returns True if the document is marked as modified, and False otherwse
+
+
+
+
diff --git a/src/Gui/DocumentPyImp.cpp b/src/Gui/DocumentPyImp.cpp
index 450fca8bd..de06e242b 100644
--- a/src/Gui/DocumentPyImp.cpp
+++ b/src/Gui/DocumentPyImp.cpp
@@ -321,6 +321,11 @@ Py::Object DocumentPy::getDocument(void) const
}
}
+Py::Boolean DocumentPy::getModified(void) const
+{
+ return Py::Boolean(getDocumentPtr()->isModified());
+}
+
PyObject *DocumentPy::getCustomAttributes(const char* attr) const
{
// Note: Here we want to return only a document object if its