From 9257e9471f0ab33049d838cfcb2bf841d657726d Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 18 Oct 2015 16:09:25 +0200 Subject: [PATCH] + allow that an object cannot be set to edit mode --- src/Gui/DocumentPyImp.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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)