Skip to content

Commit cb64945

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 c99c0f2 commit cb64945

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ RowLayout {
3535
var tooltip = ""
3636
if (!attribute.validValue && attribute.desc.errorMessage !== "")
3737
tooltip += "<i><b>Error: </b>" + Format.plainToHtml(attribute.desc.errorMessage) + "</i><br><br>"
38-
tooltip += "<b> " + attribute.desc.name + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(attribute.desc.description)
38+
tooltip += "<b> " + attribute.fullName + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(attribute.desc.description)
3939

40+
console.warn(attribute.fullName)
4041
parameterTooltip.text = tooltip
4142
}
4243
}
@@ -85,7 +86,7 @@ RowLayout {
8586
var tooltip = ""
8687
if (!object.validValue && object.desc.errorMessage !== "")
8788
tooltip += "<i><b>Error: </b>" + Format.plainToHtml(object.desc.errorMessage) + "</i><br><br>"
88-
tooltip += "<b>" + object.desc.name + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(object.description)
89+
tooltip += "<b>" + object.fullName + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(object.description)
8990
return tooltip
9091
}
9192
visible: parameterMA.containsMouse

meshroom/ui/qml/GraphEditor/AttributePin.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ RowLayout {
4242
spacing: 3
4343

4444
ToolTip {
45-
text: attribute.name + ": " + attribute.type
45+
text: attribute.fullName + ": " + attribute.type
4646
visible: nameLabel.hovered
4747

4848
y: nameLabel.y + nameLabel.height

0 commit comments

Comments
 (0)