X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Feditwindow.cpp;fp=src%2Feditwindow.cpp;h=9d0f5d8d803b725ca27ab5a2f051e3f39bf3ea4a;hb=0c01fa32c7e0629ae61992e0419f03724fc18487;hp=429943d2a7c707cfbcdc08cff1f0e894ce1319f9;hpb=3ef71393f70213eb53db552605ae3c93f1303ee9;p=ttedit diff --git a/src/editwindow.cpp b/src/editwindow.cpp index 429943d..9d0f5d8 100755 --- a/src/editwindow.cpp +++ b/src/editwindow.cpp @@ -212,7 +212,7 @@ void EditWindow::paintEvent(QPaintEvent * /*event*/) rotated.RotatePoints(rotationAngle, IPoint(rotationCenter.x(), rotationCenter.y())); else if (tool == TOOLRotatePoly) { - uint16 poly = rotated.GetPolyForPointNumber(ptHighlight); + uint16_t poly = rotated.GetPolyForPointNumber(ptHighlight); rotated.RotatePolyAroundCentroid(poly, rotationAngle); } @@ -226,6 +226,7 @@ void EditWindow::DrawGlyph(QPainter & p, GlyphPoints & glyph) { for(int poly=0; polykey() == Qt::Key_Up) + { + pts.SetXY(ptHighlight, pts.GetX(ptHighlight), pts.GetY(ptHighlight) + 1); + } + else if (event->key() == Qt::Key_Down) + pts.SetXY(ptHighlight, pts.GetX(ptHighlight), pts.GetY(ptHighlight) - 1); + else if (event->key() == Qt::Key_Right) + pts.SetXY(ptHighlight, pts.GetX(ptHighlight) + 1, pts.GetY(ptHighlight)); + else if (event->key() == Qt::Key_Left) + pts.SetXY(ptHighlight, pts.GetX(ptHighlight) - 1, pts.GetY(ptHighlight)); + else + return; + + event->accept(); + update(); + ((TTEdit *)qApp)->charWnd->MakePathFromPoints(&pts); + ((TTEdit *)qApp)->charWnd->update(); } -void EditWindow::keyReleaseEvent(QKeyEvent * event) +void EditWindow::keyReleaseEvent(QKeyEvent * /*event*/) { }