[ui] GraphEditor: use node label in duplicates tooltip

This commit is contained in:
Fabien Castan 2019-09-12 12:48:43 +02:00 committed by Yann Lanthony
parent c128080bbb
commit bbe40e0bc6
No known key found for this signature in database
GPG key ID: 519FAE6DF7A70642
2 changed files with 11 additions and 5 deletions

View file

@ -391,7 +391,15 @@ class BaseNode(BaseObject):
Returns:
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 "")
@property