Offset in command shell broken.

Issue #227 resolved
Mike Evans created an issue

offset torchy-F.Cu.gbr 10 10 ERROR: offset() takes exactly 2 arguments (3 given) Python traceback: <type 'exceptions.TypeError'> File "/home/mikee/Projects/flatcam-fork/tclCommands/TclCommandOffset.py", line 53, in execute > self.app.collection.get_by_name(name).offset(x, y) File "/home/mikee/Projects/flatcam-fork/tclCommands/TclCommand.py", line 269, in execute_wrapper > return self.execute(args, unnamed_args) while executing "offset torchy-F.Cu.gbr 10 10"

It's a simple fix, a PR seems excessive so here's a diff.

diff --git tclCommands/TclCommandOffset.py tclCommands/TclCommandOffset.py
index 17ffdaa..63ddc60 100644
--- tclCommands/TclCommandOffset.py
+++ tclCommands/TclCommandOffset.py
@@ -50,4 +50,4 @@ class TclCommandOffset(TclCommand.TclCommand):
         name = args['name']
         x, y = args['x'], args['y']

-        self.app.collection.get_by_name(name).offset(x, y)
+        self.app.collection.get_by_name(name).offset((x, y))

Comments (5)

  1. Juan Pablo Caram repo owner

    Hi @saxicola , I merged you code. Could you please check it and let me know if I can close this issue?

  2. Log in to comment