Don't set cursor "arrow close hand" after double mouse click.

--HG--
branch : feature
This commit is contained in:
dismine 2014-08-29 17:10:47 +03:00
parent b2b7854598
commit ae4bab9d07
3 changed files with 7 additions and 6 deletions

View file

@ -263,7 +263,7 @@ void VToolSinglePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
//---------------------------------------------------------------------------------------------------------------------
void VToolSinglePoint::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && event->type() != QEvent::GraphicsSceneMouseDoubleClick)
{
#ifndef QT_NO_CURSOR
QPixmap pixmap(QLatin1String("://cursor/cursor-arrow-closehand.png"));
@ -276,7 +276,7 @@ void VToolSinglePoint::mousePressEvent(QGraphicsSceneMouseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
void VToolSinglePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && event->type() != QEvent::GraphicsSceneMouseDoubleClick)
{
//Disable cursor-arrow-closehand
#ifndef QT_NO_CURSOR

View file

@ -127,7 +127,7 @@ QVariant VControlPointSpline::itemChange(QGraphicsItem::GraphicsItemChange chang
//---------------------------------------------------------------------------------------------------------------------
void VControlPointSpline::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && event->type() != QEvent::GraphicsSceneMouseDoubleClick)
{
#ifndef QT_NO_CURSOR
QPixmap pixmap(QLatin1String("://cursor/cursor-arrow-closehand.png"));
@ -140,7 +140,7 @@ void VControlPointSpline::mousePressEvent(QGraphicsSceneMouseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
void VControlPointSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && event->type() != QEvent::GraphicsSceneMouseDoubleClick)
{
//Disable cursor-arrow-closehand
#ifndef QT_NO_CURSOR

View file

@ -31,6 +31,7 @@
#include <QBrush>
#include <QStyle>
#include <QStyleOptionGraphicsItem>
#include <QGraphicsSceneMouseEvent>
//---------------------------------------------------------------------------------------------------------------------
/**
@ -141,7 +142,7 @@ void VGraphicsSimpleTextItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *e
//---------------------------------------------------------------------------------------------------------------------
void VGraphicsSimpleTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && event->type() != QEvent::GraphicsSceneMouseDoubleClick)
{
#ifndef QT_NO_CURSOR
QPixmap pixmap(QLatin1String("://cursor/cursor-arrow-closehand.png"));
@ -154,7 +155,7 @@ void VGraphicsSimpleTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
//---------------------------------------------------------------------------------------------------------------------
void VGraphicsSimpleTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
if (event->button() == Qt::LeftButton && event->type() != QEvent::GraphicsSceneMouseDoubleClick)
{
//Disable cursor-arrow-closehand
#ifndef QT_NO_CURSOR