Add check to prevent crashes due to non-string label names.

This commit is contained in:
AccentuSoft
2022-04-14 01:19:50 +03:00
parent fffe7b2555
commit 9dcac3ad6d

View File

@@ -58,6 +58,8 @@ class BaseNode(QGraphicsItemGroup):
self.parentGroup = None
def updateLabel(self, newText: str = '') -> None:
if not isinstance(newText, str):
newText = str(newText)
if newText != '':
if len(newText) > 50:
newText = newText[:47] + "..."