Skip to content

Commit

Permalink
FEM: Python object base classes, some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Mar 5, 2020
1 parent 9d311b2 commit 062d782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Mod/Fem/femguiobjects/ViewProviderFemConstraint.py
Expand Up @@ -97,8 +97,7 @@ def doubleClicked(self, vobj):
FreeCAD.Console.PrintError(message + "\n")
return True

def __getstate__(self):

This comment has been minimized.

Copy link
@berndhahnebach

berndhahnebach Mar 10, 2020

Author Contributor

this adds a regression which was fixed in 55bfa9d

return None

# a few objects had this method in their class before the move to this base class
# these objects will give a setAttr failed error on document loading without this method
def __setstate__(self, state):
return None
6 changes: 6 additions & 0 deletions src/Mod/Fem/femobjects/FemConstraint.py
Expand Up @@ -37,4 +37,10 @@ def __init__(self, obj):
self.Object = obj # keep a ref to the DocObj for nonGui usage
obj.Proxy = self # link between App::DocumentObject to this object

# a few objects had this method in their class before the move to this base class
# these objects will give a setAttr failed error on document loading without this method
def __setstate__(self, state):
if state:
self.Type = state

## @}

0 comments on commit 062d782

Please sign in to comment.