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:
@@ -113,11 +113,11 @@ class ArchReference:
|
||||
if obj.ViewObject and obj.ViewObject.Proxy:
|
||||
obj.ViewObject.Proxy.loadInventor(obj)
|
||||
|
||||
def __getstate__(self):
|
||||
def dumps(self):
|
||||
|
||||
return None
|
||||
|
||||
def __setstate__(self,state):
|
||||
def loads(self,state):
|
||||
|
||||
return None
|
||||
|
||||
@@ -395,11 +395,11 @@ class ViewProviderArchReference:
|
||||
s = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("ReferenceCheckInterval",60)
|
||||
self.timer.start(1000*s)
|
||||
|
||||
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