mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 14:31:13 +02:00
Fix issue with some SVG symbols that could not be used in GNS3.
This was due to the height and width values being percentages.
This commit is contained in:
1 parent
19c5ff8521
commit
fd5df0052a
2 files changed
+14
-6
No files matched your search
@@ -239,6 +239,7 @@ class Node:
|
||||
|
||||
@symbol.setter
|
||||
def symbol(self, val):
|
||||
|
||||
if val is None:
|
||||
val = ":/symbols/computer.svg"
|
||||
|
||||
@@ -252,8 +253,9 @@ class Node:
|
||||
self._symbol = val
|
||||
try:
|
||||
self._width, self._height, filetype = self._project.controller.symbols.get_size(val)
|
||||
# If symbol is invalid we replace it by default
|
||||
except (ValueError, OSError):
|
||||
except (ValueError, OSError) as e:
|
||||
log.error("Could not write symbol: {}".format(e))
|
||||
# If symbol is invalid we replace it by the default
|
||||
self.symbol = ":/symbols/computer.svg"
|
||||
if self._label is None:
|
||||
# Apply to label user style or default
|
||||
|
||||
Reference in new issue
Block a user