- fixed the Tcl commands AddCircle, AddPolygon, AddPolyline and AddRectangle to have stored bounds therefore making them movable/selectable on canvas
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
from camlib import Geometry
|
||||
import collections
|
||||
from tclCommands.TclCommand import TclCommandSignaled
|
||||
from tclCommands.TclCommand import *
|
||||
|
||||
|
||||
class TclCommandAddPolyline(TclCommandSignaled):
|
||||
@@ -52,7 +50,7 @@ class TclCommandAddPolyline(TclCommandSignaled):
|
||||
if obj is None:
|
||||
self.raise_tcl_error("Object not found: %s" % name)
|
||||
|
||||
if not isinstance(obj, Geometry):
|
||||
if obj.kind != 'geometry':
|
||||
self.raise_tcl_error('Expected Geometry, got %s %s.' % (name, type(obj)))
|
||||
|
||||
if len(unnamed_args) % 2 != 0:
|
||||
@@ -62,4 +60,3 @@ class TclCommandAddPolyline(TclCommandSignaled):
|
||||
points = [[float(unnamed_args[2*i]), float(unnamed_args[2*i+1])] for i in range(nr_points)]
|
||||
|
||||
obj.add_polyline(points)
|
||||
obj.plot()
|
||||
|
||||
Reference in New Issue
Block a user