From 0f90b6123513c5bca86fe6cce212ea563a6d9f8c Mon Sep 17 00:00:00 2001 From: BojanKverh Date: Wed, 29 Jun 2016 23:52:48 +0200 Subject: [PATCH] Fixed the vtextgraphicsitem mouse events bug --HG-- branch : feature --- src/libs/vtools/tools/vtextgraphicsitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/vtools/tools/vtextgraphicsitem.cpp b/src/libs/vtools/tools/vtextgraphicsitem.cpp index 4b316a66b..f64b7e162 100644 --- a/src/libs/vtools/tools/vtextgraphicsitem.cpp +++ b/src/libs/vtools/tools/vtextgraphicsitem.cpp @@ -163,7 +163,7 @@ QRectF VTextGraphicsItem::boundingRect() const //--------------------------------------------------------------------------------------------------------------------- void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME) { - if ((pME->buttons() & Qt::LeftButton) > 0) + if (pME->button() == Qt::LeftButton) { m_ptStart = pME->pos(); m_szStart = m_rectBoundingBox.size(); @@ -200,7 +200,7 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME) //--------------------------------------------------------------------------------------------------------------------- void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME) { - if ((pME->buttons() & Qt::LeftButton) > 0) + if (pME->button() == Qt::LeftButton) { if (m_eMode == mMove) {