[skip ci] App: print affected Python type if serializing via JSON fails
FemGui: add default implementations of __getstate__/__setstate__ to _ViewProviderFemResultMechanical
This commit is contained in:
@@ -109,6 +109,8 @@ std::string PropertyPythonObject::toString() const
|
||||
repr = str.as_std_string("ascii");
|
||||
}
|
||||
catch (Py::Exception&) {
|
||||
Py::String typestr(this->object.type().str());
|
||||
Base::Console().Error("PropertyPythonObject::toString(): failed for %s\n", typestr.as_string().c_str());
|
||||
Base::PyException e; // extract the Python error text
|
||||
e.ReportException();
|
||||
}
|
||||
|
||||
@@ -85,6 +85,12 @@ class _ViewProviderFemResultMechanical(ViewProviderFemConstraint.ViewProxy):
|
||||
FreeCAD.Console.PrintError("Error in onDelete: {0} \n".format(err))
|
||||
return True
|
||||
|
||||
def __getstate__(self):
|
||||
return None
|
||||
|
||||
def __setstate__(self, data):
|
||||
return None
|
||||
|
||||
|
||||
class _TaskPanel:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user