From 0cdfd8b640dc58a4cb3b89b47ecfdb0cd4e7864b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Mon, 23 Sep 2024 19:19:36 +0200 Subject: [PATCH] [GraphEditor] Refer to an attribute's parent in its tooltip If an attribute belongs to a `GroupAttribute` or a `ListAttribute`, it has a parent, and its full name is "parentName.attributeName". Instead of displaying only "attributeName" in the tooltip, this commit now displays "parentName.attributeName" to ensure that the link is obvious. --- meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml | 6 ++++-- meshroom/ui/qml/GraphEditor/AttributePin.qml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml index d0942e2c6e..8d426326ed 100644 --- a/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml +++ b/meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml @@ -29,12 +29,14 @@ RowLayout { function updateAttributeLabel() { background.color = attribute.validValue ? Qt.darker(palette.window, 1.1) : Qt.darker(Colors.red, 1.5) + console.warn("about to enter if") if (attribute.desc) { var tooltip = "" if (!attribute.validValue && attribute.desc.errorMessage !== "") tooltip += "Error: " + Format.plainToHtml(attribute.desc.errorMessage) + "

" - tooltip += " " + attribute.desc.name + ": " + attribute.type + "
" + Format.plainToHtml(attribute.desc.description) + tooltip += " " + attribute.fullName + ": " + attribute.type + "
" + Format.plainToHtml(attribute.desc.description) + console.warn(attribute.fullName) parameterTooltip.text = tooltip } } @@ -81,7 +83,7 @@ RowLayout { var tooltip = "" if (!object.validValue && object.desc.errorMessage !== "") tooltip += "Error: " + Format.plainToHtml(object.desc.errorMessage) + "

" - tooltip += "" + object.desc.name + ": " + attribute.type + "
" + Format.plainToHtml(object.description) + tooltip += "" + object.fullName + ": " + attribute.type + "
" + Format.plainToHtml(object.description) return tooltip } visible: parameterMA.containsMouse diff --git a/meshroom/ui/qml/GraphEditor/AttributePin.qml b/meshroom/ui/qml/GraphEditor/AttributePin.qml index 6e160f48f0..a02f49b19c 100755 --- a/meshroom/ui/qml/GraphEditor/AttributePin.qml +++ b/meshroom/ui/qml/GraphEditor/AttributePin.qml @@ -41,7 +41,7 @@ RowLayout { spacing: 3 ToolTip { - text: attribute.name + ": " + attribute.type + text: attribute.fullName + ": " + attribute.type visible: nameLabel.hovered y: nameLabel.y + nameLabel.height