Fix an error when importing old topology without color for label

Fix #736
This commit is contained in:
Julien Duponchelle committed 2016-10-24 14:58:14 +02:00
1 parent ac1eef256f
commit 10e7b32409
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -33,6 +33,8 @@ def qt_font_to_style(font, color):
if font_info[5] == "1":
style += "font-style: italic;"
if color is None:
color = "000000"
if len(color) == 9:
style += "fill: #" + color[-6:] + ";"
style += "fill-opacity: {};".format(round(1.0 / 255 * int(color[:3][-2:], base=16), 2))