Merge pull request #974 from 2xB/fix-296-2
FIX: RecursionError when instanciating CtrlNode
This commit is contained in:
commit
7b70d66c6a
@ -91,14 +91,15 @@ class CtrlNode(Node):
|
|||||||
sigStateChanged = QtCore.Signal(object)
|
sigStateChanged = QtCore.Signal(object)
|
||||||
|
|
||||||
def __init__(self, name, ui=None, terminals=None):
|
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 ui is None:
|
||||||
if hasattr(self, 'uiTemplate'):
|
if hasattr(self, 'uiTemplate'):
|
||||||
ui = self.uiTemplate
|
ui = self.uiTemplate
|
||||||
else:
|
else:
|
||||||
ui = []
|
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.ui, self.stateGroup, self.ctrls = generateUi(ui)
|
||||||
self.stateGroup.sigChanged.connect(self.changed)
|
self.stateGroup.sigChanged.connect(self.changed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user