poly = new SPoly();
poly.addPoint(snapPoint(cursor));
hotspot = cursor;
SketchDocument doc = (SketchDocument) context.getDocument();
doc.getCurrentPage().add(poly);
context.getUndoManager().pushAction(new UndoableAddNodeAction(context,poly,"polygon"));
point = new Point2D.Double();
point.setLocation(cursor);
poly.addPoint(point);
context.redraw();
} else {