From a5407fc8c78131cdab64b6e56711165f080f42b7 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Wed, 29 Jul 2020 11:34:45 +0200 Subject: [PATCH] [ui] Graph Editor: remove useless attributes property --- meshroom/ui/qml/GraphEditor/AttributeEditor.qml | 3 --- meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml | 2 +- meshroom/ui/qml/GraphEditor/NodeEditor.qml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/AttributeEditor.qml b/meshroom/ui/qml/GraphEditor/AttributeEditor.qml index c1d60119..6baeca39 100644 --- a/meshroom/ui/qml/GraphEditor/AttributeEditor.qml +++ b/meshroom/ui/qml/GraphEditor/AttributeEditor.qml @@ -10,7 +10,6 @@ import Utils 1.0 ListView { id: root - property variant attributes: null property bool readOnly: false property int labelWidth: 180 @@ -23,8 +22,6 @@ ListView { clip: true ScrollBar.vertical: ScrollBar { id: scrollBar } - model: attributes - delegate: Loader { active: object.enabled && (!object.desc.advanced || GraphEditorSettings.showAdvancedAttributes) visible: active diff --git a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml index 5aee77bd..7c918196 100644 --- a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml +++ b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml @@ -370,7 +370,7 @@ RowLayout { Component.onCompleted: { var cpt = Qt.createComponent("AttributeEditor.qml"); var obj = cpt.createObject(groupItem, - {'attributes': Qt.binding(function() { return attribute.value }), + {'model': Qt.binding(function() { return attribute.value }), 'readOnly': Qt.binding(function() { return root.readOnly }), 'labelWidth': 100, // reduce label width for children (space gain) }) diff --git a/meshroom/ui/qml/GraphEditor/NodeEditor.qml b/meshroom/ui/qml/GraphEditor/NodeEditor.qml index 4cc96ae6..ba3e33bf 100644 --- a/meshroom/ui/qml/GraphEditor/NodeEditor.qml +++ b/meshroom/ui/qml/GraphEditor/NodeEditor.qml @@ -122,7 +122,7 @@ Panel { currentIndex: tabBar.currentIndex AttributeEditor { - attributes: root.node.attributes + model: root.node.attributes readOnly: root.readOnly || root.isCompatibilityNode onAttributeDoubleClicked: root.attributeDoubleClicked(mouse, attribute) onUpgradeRequest: root.upgradeRequest()