App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class. Thus rename them to 'loads' and 'dumps'
This commit is contained in:
@@ -279,11 +279,11 @@ class ArchGrid:
|
||||
else:
|
||||
return [f.CenterOfMass for f in obj.Shape.Faces]
|
||||
|
||||
def __getstate__(self):
|
||||
def dumps(self):
|
||||
|
||||
return None
|
||||
|
||||
def __setstate__(self,state):
|
||||
def loads(self,state):
|
||||
|
||||
return None
|
||||
|
||||
@@ -330,11 +330,11 @@ class ViewProviderArchGrid:
|
||||
def edit(self):
|
||||
FreeCADGui.ActiveDocument.setEdit(self.Object, 0)
|
||||
|
||||
def __getstate__(self):
|
||||
def dumps(self):
|
||||
|
||||
return None
|
||||
|
||||
def __setstate__(self,state):
|
||||
def loads(self,state):
|
||||
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user