From 5dbe3b346a3845c0aa2736270e05738da4233d5f Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 18 Mar 2020 12:41:01 +0100 Subject: [PATCH] FEM: base python object, fix and comment --- src/Mod/Fem/femobjects/FemConstraint.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Fem/femobjects/FemConstraint.py b/src/Mod/Fem/femobjects/FemConstraint.py index 26eef95b4d..060a1ac634 100644 --- a/src/Mod/Fem/femobjects/FemConstraint.py +++ b/src/Mod/Fem/femobjects/FemConstraint.py @@ -37,15 +37,16 @@ class Proxy(object): # self.Object = obj # keep a ref to the DocObj for nonGui usage obj.Proxy = self # link between App::DocumentObject to this object - # they are needed, see https://forum.freecadweb.org/viewtopic.php?f=18&t=44021 + # they are needed, see: + # https://forum.freecadweb.org/viewtopic.php?f=18&t=44021 + # https://forum.freecadweb.org/viewtopic.php?f=18&t=44009 def __getstate__(self): - return None + return self.Type def __setstate__(self, state): # a few FEM objects had this attribut assignment before the move to this Python base obj class # these objects will give a setAttr failed error on document loading without this assignment if state: self.Type = state - return None ## @}