diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 2fedca46..23713a11 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -831,10 +831,6 @@ Item { property bool updateSelectionOnClick: false property var temporaryEdgeAboutToBeRemoved: undefined - function isNodeSelected(index: int) { - return uigraph.nodeSelection.isRowSelected(index); - } - delegate: Node { id: nodeDelegate @@ -844,19 +840,12 @@ Item { mainSelected: uigraph.selectedNode === node hovered: uigraph.hoveredNode === node - selected: nodeRepeater.isNodeSelected(index); + // ItemSelectionModel.hasSelection triggers updates anytime the selectionChanged() signal is emitted. + selected: uigraph.nodeSelection.hasSelection ? uigraph.nodeSelection.isRowSelected(index) : false onAttributePinCreated: function(attribute, pin) { registerAttributePin(attribute, pin) } onAttributePinDeleted: function(attribute, pin) { unregisterAttributePin(attribute, pin) } - Connections { - target: uigraph.nodeSelection - - function onSelectionChanged() { - selected = nodeRepeater.isNodeSelected(index); - } - } - onPressed: function(mouse) { nodeRepeater.updateSelectionOnClick = true; nodeRepeater.ongoingDrag = true;