#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()
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();
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()