From a8417b6478befc9173bb2f70d0a12b46bc8758e8 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Thu, 10 Sep 2020 08:59:17 -0400 Subject: [PATCH] fix exception in DataTreeWidget when clicking on a node with multivalue Terminal connected --- pyqtgraph/flowchart/Terminal.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyqtgraph/flowchart/Terminal.py b/pyqtgraph/flowchart/Terminal.py index 016e2d30..7c512dda 100644 --- a/pyqtgraph/flowchart/Terminal.py +++ b/pyqtgraph/flowchart/Terminal.py @@ -267,6 +267,11 @@ class Terminal(object): def saveState(self): return {'io': self._io, 'multi': self._multi, 'optional': self._optional, 'renamable': self._renamable, 'removable': self._removable, 'multiable': self._multiable} + def __lt__(self, other): + """When the terminal is multi value, the data passed to the DatTreeWidget for each input or output, is {Terminal: value}. + To make this sortable, we provide the < operator. + """ + return self._name < other._name class TerminalGraphicsItem(GraphicsObject):