mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-19 07:48:10 +00:00
Tune how to get the size of SVG images. Ref https://github.com/GNS3/gns3-gui/issues/2674.
* Default for missing height/width is "100%" as defined in the SVG specification
* Better error message, if viewBox attribute is missing
* Removal of "%" in percent more fault tolerant by using rstrip("%")
(cherry picked from commit e3757a8955
)
This commit is contained in:
@ -254,7 +254,7 @@ class Node:
|
||||
try:
|
||||
self._width, self._height, filetype = self._project.controller.symbols.get_size(val)
|
||||
except (ValueError, OSError) as e:
|
||||
log.error("Could not write symbol: {}".format(e))
|
||||
log.error("Could not set symbol: {}".format(e))
|
||||
# If symbol is invalid we replace it by the default
|
||||
self.symbol = ":/symbols/computer.svg"
|
||||
if self._label is None:
|
||||
|
Reference in New Issue
Block a user