From 2d86a7fdcf8f2aac9339c5187e24f472c3b65dcf Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 2 Sep 2016 12:11:15 +0200 Subject: [PATCH] Fix invalid height for drawing images Fix https://github.com/GNS3/gns3-gui/issues/1462 --- gns3server/controller/drawing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/controller/drawing.py b/gns3server/controller/drawing.py index a8ef4e31..d516b04f 100644 --- a/gns3server/controller/drawing.py +++ b/gns3server/controller/drawing.py @@ -73,7 +73,7 @@ class Drawing: return data.decode() except UnicodeError: width, height, filetype = get_size(data) - return "\n\n".format(b64=base64.b64encode(data).decode(), filetype=filetype, width=width, height=width) + return "\n\n".format(b64=base64.b64encode(data).decode(), filetype=filetype, width=width, height=height) except OSError: log.warning("Image file %s missing", filename) return "" @@ -172,7 +172,7 @@ class Drawing: svg_changed = False for prop in kwargs: if prop == "drawing_id": - pass # No good reason to change a drawing_id + pass # No good reason to change a drawing_id elif getattr(self, prop) != kwargs[prop]: if prop == "svg": # To avoid spamming client with large data we don't send the svg if the SVG didn't change