minor fixes
This commit is contained in:
parent
d65026f73d
commit
fedecc5808
@ -189,7 +189,8 @@ class Flowchart(Node):
|
|||||||
self.viewBox.addItem(item)
|
self.viewBox.addItem(item)
|
||||||
item.moveBy(*pos)
|
item.moveBy(*pos)
|
||||||
self._nodes[name] = node
|
self._nodes[name] = node
|
||||||
self.widget().addNode(node)
|
if node is not self.inputNode and node is not self.outputNode:
|
||||||
|
self.widget().addNode(node)
|
||||||
node.sigClosed.connect(self.nodeClosed)
|
node.sigClosed.connect(self.nodeClosed)
|
||||||
node.sigRenamed.connect(self.nodeRenamed)
|
node.sigRenamed.connect(self.nodeRenamed)
|
||||||
node.sigOutputChanged.connect(self.nodeOutputChanged)
|
node.sigOutputChanged.connect(self.nodeOutputChanged)
|
||||||
|
@ -30,6 +30,11 @@ def generateUi(opts):
|
|||||||
k, t, o = opt
|
k, t, o = opt
|
||||||
else:
|
else:
|
||||||
raise Exception("Widget specification must be (name, type) or (name, type, {opts})")
|
raise Exception("Widget specification must be (name, type) or (name, type, {opts})")
|
||||||
|
|
||||||
|
## clean out these options so they don't get sent to SpinBox
|
||||||
|
hidden = o.pop('hidden', False)
|
||||||
|
tip = o.pop('tip', None)
|
||||||
|
|
||||||
if t == 'intSpin':
|
if t == 'intSpin':
|
||||||
w = QtGui.QSpinBox()
|
w = QtGui.QSpinBox()
|
||||||
if 'max' in o:
|
if 'max' in o:
|
||||||
@ -63,11 +68,12 @@ def generateUi(opts):
|
|||||||
w = ColorButton()
|
w = ColorButton()
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown widget type '%s'" % str(t))
|
raise Exception("Unknown widget type '%s'" % str(t))
|
||||||
if 'tip' in o:
|
|
||||||
w.setToolTip(o['tip'])
|
if tip is not None:
|
||||||
|
w.setToolTip(tip)
|
||||||
w.setObjectName(k)
|
w.setObjectName(k)
|
||||||
l.addRow(k, w)
|
l.addRow(k, w)
|
||||||
if o.get('hidden', False):
|
if hidden:
|
||||||
w.hide()
|
w.hide()
|
||||||
label = l.labelForField(w)
|
label = l.labelForField(w)
|
||||||
label.hide()
|
label.hide()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user