Skip to content
Permalink
Browse files

Ignore right clicks on mouse handles

  • Loading branch information
nyalldawson committed Mar 11, 2020
1 parent 4169c7b commit 86b73630c87ab5b7f546d52581a03f39d9d84655
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/gui/qgsgraphicsviewmousehandles.cpp
@@ -452,6 +452,12 @@ void QgsGraphicsViewMouseHandles::hoverLeaveEvent( QGraphicsSceneHoverEvent *eve

void QgsGraphicsViewMouseHandles::mousePressEvent( QGraphicsSceneMouseEvent *event )
{
if ( event->button() != Qt::LeftButton )
{
event->ignore();
return;
}

//save current cursor position
mMouseMoveStartPos = event->lastScenePos();
mLastMouseEventPos = event->lastScenePos();
@@ -526,6 +532,12 @@ void QgsGraphicsViewMouseHandles::mouseMoveEvent( QGraphicsSceneMouseEvent *even

void QgsGraphicsViewMouseHandles::mouseReleaseEvent( QGraphicsSceneMouseEvent *event )
{
if ( event->button() != Qt::LeftButton )
{
event->ignore();
return;
}

QPointF mouseMoveStopPoint = event->lastScenePos();
double diffX = mouseMoveStopPoint.x() - mMouseMoveStartPos.x();
double diffY = mouseMoveStopPoint.y() - mMouseMoveStartPos.y();

0 comments on commit 86b7363

Please sign in to comment.
You can’t perform that action at this time.