- fixed SVG import to show an error for SVG files that have SVG units not mm or cm or inch

- for SVG files with cm units the scaling factor is multiplied by 10
- the app will signal failure when encountering the 'g' SVG element which is not supported and cancel the SVG import
This commit is contained in:
Marius Stanciu
2021-05-16 20:31:43 +03:00
committed by Marius
parent 8972b3d635
commit 8cd5d253be
4 changed files with 30 additions and 3 deletions

View File

@@ -10623,7 +10623,10 @@ class MenuFileHandlers(QtCore.QObject):
units = self.defaults['units'].upper()
def obj_init(geo_obj, app_obj):
geo_obj.import_svg(filename, obj_type, units=units)
res = geo_obj.import_svg(filename, obj_type, units=units)
if res == 'fail':
return 'fail'
geo_obj.multigeo = True
with open(filename) as f: