1 from Converter import Converter
3 class ConditionalShowHide(Converter, object):
4 def __init__(self, type):
5 Converter.__init__(self, type)
6 self.invert = type == "Invert"
8 def calcVisibility(self):
9 b = self.source.boolean
15 def changed(self, what):
16 vis = self.calcVisibility()
17 for x in self.downstream_elements:
20 def connectDownstream(self, downstream):
21 Converter.connectDownstream(self, downstream)
22 downstream.visible = self.calcVisibility()