Arch: Fixed crash on creating new BuildingParts

This commit is contained in:
Yorik van Havre
2018-12-20 13:21:48 -02:00
parent f77c605ca8
commit 2e03d02a1a

View File

@@ -637,6 +637,8 @@ class ViewProviderBuildingPart:
if not vobj.ShowUnit:
u = ""
txt += fmt.format(float(q)) + str(u)
if not txt:
txt = " " # empty texts make coin crash...
if isinstance(txt,unicode):
txt = txt.encode("utf8")
self.txt.string.setValue(txt)