diff --git a/flowchart/Flowchart.py b/flowchart/Flowchart.py index 6b1352d5..5d7dc093 100644 --- a/flowchart/Flowchart.py +++ b/flowchart/Flowchart.py @@ -113,8 +113,11 @@ class Flowchart(Node): self.inputNode.setOutput(**args) def outputChanged(self): - self.widget().outputChanged(self.outputNode.inputValues()) - self.sigOutputChanged.emit(self) + ## called when output of internal node has changed + vals = self.outputNode.inputValues() + self.widget().outputChanged(vals) + self.setOutput(**vals) + #self.sigOutputChanged.emit(self) def output(self): return self.outputNode.inputValues() @@ -261,7 +264,9 @@ class Flowchart(Node): def process(self, **args): """ Process data through the flowchart, returning the output. - Keyword arguments must be the names of input terminals + + Keyword arguments must be the names of input terminals. + The return value is a dict with one key per output terminal. """ data = {} ## Stores terminal:value pairs diff --git a/flowchart/Node.py b/flowchart/Node.py index e6e98d1a..cd73b42b 100644 --- a/flowchart/Node.py +++ b/flowchart/Node.py @@ -229,7 +229,11 @@ class Node(QtCore.QObject): return "" % (self.name(), id(self)) def ctrlWidget(self): - """Return this Node's control widget.""" + """Return this Node's control widget. + + By default, Nodes have no control widget. Subclasses may reimplement this + method to provide a custom widget. This method is called by Flowcharts + when they are constructing their Node list.""" return None def bypass(self, byp):