preserve icon through doc restore
This commit is contained in:
parent
c4c2b80892
commit
ca9a0e5faa
1 changed files with 10 additions and 2 deletions
|
@ -9,6 +9,8 @@ class BaseViewProvider:
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.viewprovider = viewprovider
|
self.viewprovider = viewprovider
|
||||||
|
|
||||||
|
self.icon = os.path.join(settings.ICONPATH, self.parent.__class__.ICON)
|
||||||
|
|
||||||
viewprovider.Proxy = self
|
viewprovider.Proxy = self
|
||||||
|
|
||||||
self.Type = ''
|
self.Type = ''
|
||||||
|
@ -32,7 +34,7 @@ class BaseViewProvider:
|
||||||
Gui.Selection.clearSelection()
|
Gui.Selection.clearSelection()
|
||||||
|
|
||||||
def getIcon(self):
|
def getIcon(self):
|
||||||
return os.path.join(settings.ICONPATH, self.parent.__class__.ICON)
|
return self.icon
|
||||||
|
|
||||||
def getDisplayModes(self,obj):
|
def getDisplayModes(self,obj):
|
||||||
'''Return a list of display modes.'''
|
'''Return a list of display modes.'''
|
||||||
|
@ -43,4 +45,10 @@ class BaseViewProvider:
|
||||||
return 'Standard'
|
return 'Standard'
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
return None
|
return {
|
||||||
|
'icon': self.icon
|
||||||
|
}
|
||||||
|
|
||||||
|
def __setstate__(self, props):
|
||||||
|
for prop in props:
|
||||||
|
setattr(self, prop, props[prop])
|
||||||
|
|
Loading…
Add table
Reference in a new issue