X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdrawlineaction.cpp;h=27b9513c04574e395ca22a7273c3b3ed126b003d;hb=dbfab6256efe6b03e9750e33081d9dcdcdfc1c34;hp=e14ba81ca1f440876c5e60dabba0cfe9b95c7962;hpb=921bf050ffe5fc81a9ab377e634180e659ee5d5d;p=architektonas diff --git a/src/drawlineaction.cpp b/src/drawlineaction.cpp index e14ba81..27b9513 100644 --- a/src/drawlineaction.cpp +++ b/src/drawlineaction.cpp @@ -15,11 +15,8 @@ #include "drawlineaction.h" #include "line.h" #include "painter.h" -//#include "vector.h" -//#define FIRST_POINT 0 -//#define NEXT_POINT 1 enum { FIRST_POINT, NEXT_POINT }; @@ -98,7 +95,7 @@ DrawLineAction::~DrawLineAction() } -/*virtual*/ bool DrawLineAction::KeyDown(int key) +/*virtual*/ void DrawLineAction::KeyDown(int key) { if ((key == Qt::Key_Shift) && (state == NEXT_POINT)) { @@ -106,14 +103,12 @@ DrawLineAction::~DrawLineAction() p1Save = p1; p1 = p2; state = FIRST_POINT; - return true; + emit(NeedRefresh()); } - - return false; } -/*virtual*/ bool DrawLineAction::KeyReleased(int key) +/*virtual*/ void DrawLineAction::KeyReleased(int key) { if ((key == Qt::Key_Shift) && shiftWasPressedOnNextPoint) { @@ -121,9 +116,7 @@ DrawLineAction::~DrawLineAction() p2 = p1; p1 = p1Save; state = NEXT_POINT; - return true; + emit(NeedRefresh()); } - - return false; }