Skip to content

Commit

Permalink
FEM: base python object, pep8 and doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Mar 18, 2020
1 parent 73711cd commit ab42bb8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Mod/Fem/femobjects/FemConstraint.py
Expand Up @@ -25,8 +25,9 @@
__author__ = "Markus Hovorka"
__url__ = "http://www.freecadweb.org"

## \addtogroup FEM
# @{
## @package _BaseObject
# \ingroup FEM
# \brief FreeCAD _Base Object for FEM workbench


class Proxy(object):
Expand All @@ -41,12 +42,10 @@ def __init__(self, obj):
# https://forum.freecadweb.org/viewtopic.php?f=18&t=44021
# https://forum.freecadweb.org/viewtopic.php?f=18&t=44009
def __getstate__(self):
return self.Type
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

## @}

0 comments on commit ab42bb8

Please sign in to comment.