- fixed the PDF Tool when importing as Gerber objects
- moved all the parsing out of the PDF Tool to a new file ParsePDF in the flatcamParsers folder - trying to fix the pixmap load crash when running a FlatCAMScript
This commit is contained in:
@@ -98,6 +98,6 @@ class TclCommandSetOrigin(TclCommand):
|
||||
loc = [0, 0]
|
||||
|
||||
self.app.on_set_zero_click(event=None, location=loc, noplot=True, use_thread=False)
|
||||
self.app.inform.emit('[success] Tcl %s: %s' %
|
||||
(_('Origin set by offsetting all loaded objects with '),
|
||||
'{0:.4f}, {0:.4f}'.format(loc[0], loc[1])))
|
||||
msg = '[success] Tcl %s: %s' % (_('Origin set by offsetting all loaded objects with '),
|
||||
'{0:.4f}, {0:.4f}'.format(loc[0], loc[1]))
|
||||
self.app.shell_message(msg, success=True, show=False)
|
||||
|
||||
@@ -75,19 +75,22 @@ class TclCommandSetPath(TclCommand):
|
||||
if path_isdir is False:
|
||||
path_isfile = os.path.isfile(path)
|
||||
if path_isfile:
|
||||
self.app.inform.emit('[ERROR] %s: %s, %s' % (
|
||||
msg = '[ERROR] %s: %s, %s' % (
|
||||
"The provided path",
|
||||
str(path),
|
||||
"is a path to file and not a directory as expected."))
|
||||
"is a path to file and not a directory as expected.")
|
||||
self.app.shell_message(msg, success=True, show=False)
|
||||
return "Failed. The Tcl command set_path was used but it was not a directory."
|
||||
else:
|
||||
self.app.inform.emit('[ERROR] %s: %s, %s' % (
|
||||
msg = '[ERROR] %s: %s, %s' % (
|
||||
"The provided path",
|
||||
str(path),
|
||||
"do not exist. Check for typos."))
|
||||
"do not exist. Check for typos.")
|
||||
self.app.shell_message(msg, success=True, show=False)
|
||||
return "Failed. The Tcl command set_path was used but it does not exist."
|
||||
|
||||
cd_command = 'cd %s' % path
|
||||
self.app.shell.exec_command(cd_command, no_echo=False)
|
||||
self.app.defaults["global_tcl_path"] = str(path)
|
||||
self.app.inform.emit('[success] %s: %s' % ("Relative path set to", str(path)))
|
||||
msg = '[success] %s: %s' % ("Relative path set to", str(path))
|
||||
self.app.shell_message(msg, success=True, show=False)
|
||||
|
||||
Reference in New Issue
Block a user