From 1dce05b23927b570427543b9a2cbcff791138b64 Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Sun, 20 Dec 2015 21:55:27 +0200 Subject: [PATCH] Show openHand cursor only if we can move the detail --HG-- branch : feature --- src/libs/vtools/tools/vtooldetail.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/libs/vtools/tools/vtooldetail.cpp b/src/libs/vtools/tools/vtooldetail.cpp index 3b560902f..8f8f05247 100644 --- a/src/libs/vtools/tools/vtooldetail.cpp +++ b/src/libs/vtools/tools/vtooldetail.cpp @@ -428,14 +428,20 @@ void VToolDetail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void VToolDetail::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - SetOverrideCursor(cursorArrowOpenHand, 1, 1); + if (flags() & QGraphicsItem::ItemIsMovable) + { + SetOverrideCursor(cursorArrowOpenHand, 1, 1); + } } //--------------------------------------------------------------------------------------------------------------------- void VToolDetail::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - SetOverrideCursor(cursorArrowOpenHand, 1, 1); + if (flags() & QGraphicsItem::ItemIsMovable) + { + SetOverrideCursor(cursorArrowOpenHand, 1, 1); + } } ////--------------------------------------------------------------------------------------------------------------------- @@ -443,7 +449,10 @@ void VToolDetail::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); //Disable cursor-arrow-openhand - RestoreOverrideCursor(cursorArrowOpenHand); + if (flags() & QGraphicsItem::ItemIsMovable) + { + RestoreOverrideCursor(cursorArrowOpenHand); + } } //---------------------------------------------------------------------------------------------------------------------