void EditWindow::CreateCursors(void)
{
- int hotx[10] = { 1, 1, 11, 15, 1, 1, 1, 1, 1, 1 };
- int hoty[10] = { 1, 1, 11, 13, 1, 1, 1, 1, 1, 1 };
- char cursorName[10][48] = { "select", "select-poly", "scroll", "zoom", "add-point",
- "add-poly", "del-point", "del-poly", "rotate", "rotate" };
+ int hotx[11] = { 1, 1, 11, 15, 1, 1, 1, 1, 1, 1, 1 };
+ int hoty[11] = { 1, 1, 11, 13, 1, 1, 1, 1, 1, 1, 1 };
+ char cursorName[11][48] = { "select", "select-poly", "scroll", "zoom", "add-point",
+ "add-poly", "del-point", "del-poly", "rotate", "rotate", "select" };
- for(int i=0; i<10; i++)
+ for(int i=0; i<11; i++)
{
QString s;
s.sprintf(":/res/cursor-%s.png", cursorName[i]);
rotationAngle = 0;
update();
}
+ else if (tool == TOOLFlipWinding)
+ {
+// IPoint centroid = pts.GetPolyCentroid(pts.GetPolyForPointNumber(ptHighlight));
+// rotationCenter = QPoint(centroid.x, centroid.y);
+// showRotationCenter = true;
+ pts.InvertPolyDrawSequence(pts.GetPolyForPointNumber(ptHighlight));
+ pt = GetAdjustedClientPosition(pts.GetX(ptHighlight), pts.GetY(ptHighlight));
+ QCursor::setPos(mapToGlobal(pt));
+// rotationZeroPoint = QPoint(pts.GetX(ptHighlight), pts.GetY(ptHighlight));
+// haveZeroPoint = true;
+// rotationAngle = 0;
+ update();
+// ((TTEdit *)qApp)->charWnd->MakePathFromPoints(&pts);
+// ((TTEdit *)qApp)->charWnd->update();
+ }
}
event->accept();
{
// Moving, not dragging...
if (tool == TOOLSelect || tool == TOOLDelPt || tool == TOOLAddPt
- || tool == TOOLPolySelect || tool == TOOLRotatePoly)
+ || tool == TOOLPolySelect || tool == TOOLRotatePoly || tool == TOOLFlipWinding)
{
QPoint pt2 = GetAdjustedMousePosition(event);
double closest = 1.0e+99;