Skip to content

Commit d25a890

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 e75497c commit d25a890

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
@@ -31,12 +31,14 @@ RowLayout {
3131
function updateAttributeLabel() {
3232
background.color = attribute.validValue ? Qt.darker(palette.window, 1.1) : Qt.darker(Colors.red, 1.5)
3333

34+
console.warn("about to enter if")
3435
if (attribute.desc) {
3536
var tooltip = ""
3637
if (!attribute.validValue && attribute.desc.errorMessage !== "")
3738
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)
39+
tooltip += "<b> " + attribute.fullName + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(attribute.desc.description)
3940

41+
console.warn(attribute.fullName)
4042
parameterTooltip.text = tooltip
4143
}
4244
}
@@ -85,7 +87,7 @@ RowLayout {
8587
var tooltip = ""
8688
if (!object.validValue && object.desc.errorMessage !== "")
8789
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)
90+
tooltip += "<b>" + object.fullName + ":</b> " + attribute.type + "<br>" + Format.plainToHtml(object.description)
8991
return tooltip
9092
}
9193
visible: parameterMA.containsMouse

meshroom/ui/qml/GraphEditor/AttributePin.qml

+1-1
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)