From c3ed6b43f28813d8812f15a01e94170653243c56 Mon Sep 17 00:00:00 2001 From: Mike Evans Date: Tue, 7 Feb 2017 23:13:05 +0000 Subject: [PATCH] Also fix broken add_circle command. --- tclCommands/TclCommandAddCircle.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tclCommands/TclCommandAddCircle.py b/tclCommands/TclCommandAddCircle.py index 281c918d..2d3a626e 100644 --- a/tclCommands/TclCommandAddCircle.py +++ b/tclCommands/TclCommandAddCircle.py @@ -11,7 +11,7 @@ class TclCommandAddCircle(TclCommand.TclCommand): """ # List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon) - aliases = ['export_svg'] + aliases = ['add_circle'] # Dictionary of types from Tcl command, needs to be ordered arg_names = collections.OrderedDict([ @@ -49,17 +49,17 @@ class TclCommandAddCircle(TclCommand.TclCommand): :return: """ - name = args['name'] + obj_name = args['name'] center_x = args['center_x'] center_y = args['center_y'] radius = args['radius'] try: - obj = self.collection.get_by_name(name) + obj = self.app.collection.get_by_name(str(obj_name)) except: - return "Could not retrieve object: %s" % name + return "Could not retrieve object: %s" % obj_name if obj is None: - return "Object not found: %s" % name + return "Object not found: %s" % obj_name obj.add_circle([float(center_x), float(center_y)], float(radius))