mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-21 21:16:29 +02:00
[ui] GraphEditor: use node label in duplicates tooltip
This commit is contained in:
parent
c128080bbb
commit
bbe40e0bc6
2 changed files with 11 additions and 5 deletions
|
@ -391,7 +391,15 @@ class BaseNode(BaseObject):
|
||||||
Returns:
|
Returns:
|
||||||
str: the high-level label of this node
|
str: the high-level label of this node
|
||||||
"""
|
"""
|
||||||
t, idx = self._name.split("_")
|
return self.nameToLabel(self._name)
|
||||||
|
|
||||||
|
@Slot(str, result=str)
|
||||||
|
def nameToLabel(self, name):
|
||||||
|
"""
|
||||||
|
Returns:
|
||||||
|
str: the high-level label from the technical node name
|
||||||
|
"""
|
||||||
|
t, idx = name.split("_")
|
||||||
return "{}{}".format(t, idx if int(idx) > 1 else "")
|
return "{}{}".format(t, idx if int(idx) > 1 else "")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -148,13 +148,11 @@ Item {
|
||||||
ToolTip {
|
ToolTip {
|
||||||
delay: 800
|
delay: 800
|
||||||
visible: parent.showTooltip
|
visible: parent.showTooltip
|
||||||
text: node.chunks.count > 0 ? "This node has the same values as <b>" + node.chunks.at(0).statusNodeName + "</b>" : "This node is a duplicate"
|
text: ""
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
text = node.chunks.count > 0 ? "This node has the same values as <b>" + node.chunks.at(0).statusNodeName + "</b>" : "This node is a duplicate"
|
text = "The data associated to this node has been computed by the other node: <b>" + node.nameToLabel(node.chunks.at(0).statusNodeName) + "</b>."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue