+
+
+void EditWindow::keyPressEvent(QKeyEvent * event)
+{
+ // We do this here because of the ptHighlight nonsense. If we're in
+ // the add poly tool, we'll never see this if it's under the 'sanity'
+ // check (which is needed for the arrow key shite, but still...)
+ if ((event->key() == Qt::Key_Shift) || (event->key() == Qt::Key_Control))
+ {
+ addPointOnCurve = false;
+ update();
+ }
+
+ // Sanity checking...
+ if (ptHighlight == -1)
+ return;
+
+ if (event->key() == 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;
+
+//Not need but you need to call the base class for some reason??
+// event->accept();
+ update();
+ Global::charWnd->MakePathFromPoints(&pts);
+ Global::charWnd->update();
+}
+
+
+void EditWindow::keyReleaseEvent(QKeyEvent * event)
+{
+ if ((event->key() == Qt::Key_Shift) || (event->key() == Qt::Key_Control))
+ {
+ addPointOnCurve = true;
+ }
+ else
+ return;
+
+ update();
+}
+