X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionzoompan.cpp;h=74b3d824b4d0036f2fa044c76361858f5e796626;hb=f62cebc26c7c3af447f0e4e4c43331f8589dce22;hp=7b8d3a8e552f451a0819b70ab70a53583b7fe6a8;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actionzoompan.cpp b/src/actions/actionzoompan.cpp index 7b8d3a8..74b3d82 100644 --- a/src/actions/actionzoompan.cpp +++ b/src/actions/actionzoompan.cpp @@ -18,9 +18,11 @@ #include "graphicview.h" -ActionZoomPan::ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView): +ActionZoomPan::ActionZoomPan(EntityContainer & container, GraphicView & graphicView): ActionInterface("Zoom Pan", container, graphicView) { + graphicView.snapper.SetVisible(false); + graphicView.preview.SetVisible(false); } ActionZoomPan::~ActionZoomPan() @@ -61,7 +63,7 @@ void ActionZoomPan::mouseMoveEvent(QMouseEvent * e) void ActionZoomPan::mousePressEvent(QMouseEvent * e) { - if (e->button() == Qt::MidButton || e->button() == Qt::LeftButton) + if (e->button() == Qt::LeftButton || e->button() == Qt::MidButton) { x1 = e->x(); y1 = e->y(); @@ -71,12 +73,16 @@ void ActionZoomPan::mousePressEvent(QMouseEvent * e) void ActionZoomPan::mouseReleaseEvent(QMouseEvent * e) { - if (e->button() == Qt::RightButton) + // Right button? Why? + // Is this a regular tool? Is this why? (yup, it is. but lame nonetheless.) + // It doesn't revert the cursor correctly if this is not in... + // So... We need to fix this... [DONE] + /*if (e->button() == Qt::RightButton) init(getStatus() - 1); - else if (e->button() == Qt::MidButton) + else*/ if (e->button() == Qt::MidButton || e->button() == Qt::RightButton) init(-1); else - setStatus(0); + setStatus(0); // Qt::LeftButton } void ActionZoomPan::updateMouseCursor()