+ state = NEXT_POINT;
+ }
+}
+
+
+/*virtual*/ void DrawLineAction::KeyDown(int key)
+{
+ if ((key == Qt::Key_Shift) && (state == NEXT_POINT))
+ {
+ shiftWasPressedOnNextPoint = true;
+ p1Save = p1;
+ p1 = p2;
+ state = FIRST_POINT;
+ emit(NeedRefresh());
+ }
+}
+
+
+/*virtual*/ void DrawLineAction::KeyReleased(int key)
+{
+ if ((key == Qt::Key_Shift) && shiftWasPressedOnNextPoint)
+ {
+ shiftWasPressedOnNextPoint = false;
+ p2 = p1;
+ p1 = p1Save;
+ state = NEXT_POINT;
+ emit(NeedRefresh());