mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
Fix an error when importing old topology without color for label
Fix #736
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user