icon for inactive

This commit is contained in:
sliptonic
2018-10-26 11:45:55 -05:00
committed by wmayer
parent d5edb6ed2a
commit 993d179e7c
6 changed files with 1039 additions and 29 deletions

View File

@@ -265,12 +265,12 @@ class ObjectOp(object):
def onChanged(self, obj, prop):
'''onChanged(obj, prop) ... base implementation of the FC notification framework.
Do not overwrite, overwrite opOnChanged() instead.'''
if not 'Restore' in obj.State and prop in ['Base', 'StartDepth', 'FinalDepth']:
self.updateDepths(obj, True)
self.opOnChanged(obj, prop)
def applyExpression(self, obj, prop, expr):
'''applyExpression(obj, prop, expr) ... set expression expr on obj.prop if expr is set'''
if expr:
@@ -436,13 +436,15 @@ class ObjectOp(object):
'''
PathLog.track()
if obj.ViewObject:
obj.ViewObject.Visibility = obj.Active
if not obj.Active:
path = Path.Path("(inactive operation)")
obj.Path = path
if obj.ViewObject:
obj.ViewObject.Visibility = False
return
if not self._setBaseAndStock(obj):
return

View File

@@ -145,7 +145,12 @@ class ViewProvider(object):
def getIcon(self):
'''getIcon() ... the icon used in the object tree'''
return self.OpIcon
if self.Object.Active:
return self.OpIcon
else:
return ":/icons/Path-OpActive.svg"
#return self.OpIcon
def getTaskPanelOpPage(self, obj):
'''getTaskPanelOpPage(obj) ... use the stored information to instantiate the receiver op's page controller.'''