Commit 65c1163a authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Reservoir: Allow to select only internal node.

Showing with 14 additions and 1 deletion
+14 -1
......@@ -56,9 +56,22 @@ class ComboBoxDelegate(QItemDelegate):
def createEditor(self, parent, option, index):
self.editor = QComboBox(parent)
nodes = list(
map(
lambda n: n.name,
filter(
lambda n: not (
self._data.is_upstream_node(n)
or self._data.is_downstream_node(n)
),
self._data.nodes()
)
)
)
self.editor.addItems(
[_translate("Reservoir", "Not associated")] +
self._data.nodes_names()
nodes
)
self.editor.setCurrentText(index.data(Qt.DisplayRole))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment