diff --git a/src/Gui/DocumentPyImp.cpp b/src/Gui/DocumentPyImp.cpp index 06d081748..0fa3105e8 100644 --- a/src/Gui/DocumentPyImp.cpp +++ b/src/Gui/DocumentPyImp.cpp @@ -111,12 +111,7 @@ PyObject* DocumentPy::setEdit(PyObject *args) } bool ok = getDocumentPtr()->setEdit(getDocumentPtr()->getViewProvider(obj),mod); - if (!ok) { - PyErr_Format(Base::BaseExceptionFreeCADError, "Failed to set object '%s' in edit mode", psFeatStr); - return 0; - } - - Py_Return; + return PyBool_FromLong(ok ? 1 : 0); } PyObject* DocumentPy::getInEdit(PyObject *args)