small fix if error happens inside thread execution, then pass correct error_info to display
command imort_svg was using self instead self.app wrong object Fix in svgparse for rotate regexp and division by zero problem. Linestring need at least 2 points within very small arcs. In svg rect x and y are optional , they are 0 by default. Ignore transformation for unknown kind. Strip spaces for ptliststr In parse_svg_point_list to avoid parsing errors.
This commit is contained in:
@@ -388,7 +388,11 @@ class TclCommandSignaled(TclCommand):
|
||||
return self.output
|
||||
|
||||
except Exception as unknown:
|
||||
error_info=sys.exc_info()
|
||||
# if error happens inside thread execution, then pass correct error_info to display
|
||||
if self.error_info is not None:
|
||||
error_info = self.error_info
|
||||
else:
|
||||
error_info=sys.exc_info()
|
||||
self.log.error("TCL command '%s' failed." % str(self))
|
||||
self.app.display_tcl_error(unknown, error_info)
|
||||
self.raise_tcl_unknown_error(unknown)
|
||||
@@ -58,14 +58,14 @@ class TclCommandImportSvg(TclCommand.TclCommandSignaled):
|
||||
else:
|
||||
outname = filename.split('/')[-1].split('\\')[-1]
|
||||
|
||||
with self.app.proc_container.new("Opening Gerber"):
|
||||
with self.app.proc_container.new("Import SVG"):
|
||||
|
||||
# Object creation
|
||||
self.app.new_object("gerber", outname, obj_init)
|
||||
self.app.new_object("geometry", outname, obj_init)
|
||||
|
||||
# Register recent file
|
||||
self.file_opened.emit("svg", filename)
|
||||
self.app.file_opened.emit("svg", filename)
|
||||
|
||||
# GUI feedback
|
||||
self.inform.emit("Opened: " + filename)
|
||||
self.app.inform.emit("Opened: " + filename)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user