Skip to content

Commit 66ce81e

Browse files
committed
[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.
1 parent b139905 commit 66ce81e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ RowLayout {
2929
function updateAttributeLabel() {
3030
background.color = attribute.validValue ? Qt.darker(palette.window, 1.1) : Qt.darker(Colors.red, 1.5)
3131

32+
console.warn("about to enter if")
3233
if (attribute.desc) {
3334
var tooltip = ""
3435
if (!attribute.validValue && attribute.desc.errorMessage !== "")
3536
tooltip += "<i><b>Error: </b>" + Format.plainToHtml(attribute.desc.errorMessage) + "</i><br><br>"
36-
tooltip += "<b> " + attribute.desc.name + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(attribute.desc.description)
37+
tooltip += "<b> " + attribute.fullName + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(attribute.desc.description)
3738

39+
console.warn(attribute.fullName)
3840
parameterTooltip.text = tooltip
3941
}
4042
}
@@ -81,7 +83,7 @@ RowLayout {
8183
var tooltip = ""
8284
if (!object.validValue && object.desc.errorMessage !== "")
8385
tooltip += "<i><b>Error: </b>" + Format.plainToHtml(object.desc.errorMessage) + "</i><br><br>"
84-
tooltip += "<b>" + object.desc.name + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(object.description)
86+
tooltip += "<b>" + object.fullName + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(object.description)
8587
return tooltip
8688
}
8789
visible: parameterMA.containsMouse

meshroom/ui/qml/GraphEditor/AttributePin.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RowLayout {
4040
spacing: 3
4141

4242
ToolTip {
43-
text: attribute.name + ": " + attribute.type
43+
text: attribute.fullName + ": " + attribute.type
4444
visible: nameLabel.hovered
4545

4646
y: nameLabel.y + nameLabel.height

0 commit comments

Comments
 (0)