Fixed the vtextgraphicsitem mouse events bug

--HG--
branch : feature
This commit is contained in:
BojanKverh 2016-06-29 23:52:48 +02:00
parent caa13f06ac
commit 0f90b61235

View File

@ -163,7 +163,7 @@ QRectF VTextGraphicsItem::boundingRect() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME) void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
{ {
if ((pME->buttons() & Qt::LeftButton) > 0) if (pME->button() == Qt::LeftButton)
{ {
m_ptStart = pME->pos(); m_ptStart = pME->pos();
m_szStart = m_rectBoundingBox.size(); m_szStart = m_rectBoundingBox.size();
@ -200,7 +200,7 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME) void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
{ {
if ((pME->buttons() & Qt::LeftButton) > 0) if (pME->button() == Qt::LeftButton)
{ {
if (m_eMode == mMove) if (m_eMode == mMove)
{ {