summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-05-15 12:31:47 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-15 23:31:57 (GMT)
commit0463c1e6cd26e4b88f433a5598d1bd1544a59212 (patch)
treecc4e3d6f2878e5141b4ba2670bc1bbb41b5888c3 /src/gui/graphicsview
parent0daeee468ccc76dfb957892050b4c11d4807e2d3 (diff)
downloadQt-0463c1e6cd26e4b88f433a5598d1bd1544a59212.zip
Qt-0463c1e6cd26e4b88f433a5598d1bd1544a59212.tar.gz
Qt-0463c1e6cd26e4b88f433a5598d1bd1544a59212.tar.bz2
QGV: fix items not to be selected on right mouse button release
Task-number: QTBUG-30990 Change-Id: Iaf2dd7ed496625097daa05d5dc92ef5957574ee9 (Cherry-picked from qtbase/0b862e067756132225e33be09670631edd50d944) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 63a67e0..4f31793 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -7238,7 +7238,7 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
*/
void QGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- if (flags() & ItemIsSelectable) {
+ if (event->button() == Qt::LeftButton && (flags() & ItemIsSelectable)) {
bool multiSelect = (event->modifiers() & Qt::ControlModifier) != 0;
if (event->scenePos() == event->buttonDownScenePos(Qt::LeftButton)) {
// The item didn't move