Merge pull request #974 from 2xB/fix-296-2

FIX: RecursionError when instanciating CtrlNode
This commit is contained in:
Ogi Moore 2019-08-16 21:43:32 -07:00 committed by GitHub
commit 7b70d66c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,14 +91,15 @@ class CtrlNode(Node):
sigStateChanged = QtCore.Signal(object)
def __init__(self, name, ui=None, terminals=None):
if terminals is None:
terminals = {'In': {'io': 'in'}, 'Out': {'io': 'out', 'bypass': 'In'}}
Node.__init__(self, name=name, terminals=terminals)
if ui is None:
if hasattr(self, 'uiTemplate'):
ui = self.uiTemplate
else:
ui = []
if terminals is None:
terminals = {'In': {'io': 'in'}, 'Out': {'io': 'out', 'bypass': 'In'}}
Node.__init__(self, name=name, terminals=terminals)
self.ui, self.stateGroup, self.ctrls = generateUi(ui)
self.stateGroup.sigChanged.connect(self.changed)