+ else if (tool == TOOLAddPoly) // "Add Poly" tool
+ {
+#ifdef DEBUGFOO
+WriteLogMsg("Adding point... # polys: %u, # points: %u", pts.GetNumPolys(), pts.GetNumPoints());
+#endif
+ if (polyFirstPoint)
+ {
+ polyFirstPoint = false;
+ pts.AddNewPolyAtEnd();
+ }
+
+// QPoint pt = GetAdjustedMousePosition(event);
+ Vector pt = Painter::QtToCartesianCoords(Vector(event->x(), event->y()));
+//printf("GetAdjustedMousePosition = %i, %i\n", pt.x(), pt.y());
+ // Append a point to the end of the structure
+ pts += IPoint(pt.x, pt.y, addPointOnCurve);
+// ptHighlight = pts.GetNumPoints() - 1;
+ update();
+#ifdef DEBUGFOO
+WriteLogMsg(" --> [# polys: %u, # points: %u]\n", pts.GetNumPolys(), pts.GetNumPoints());
+#endif
+ }