summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsscene.h
diff options
context:
space:
mode:
authorAndy Maloney <asmaloney@gmail.com>2015-01-04 13:41:25 -0500
committerAndy Maloney <asmaloney@gmail.com>2015-01-13 13:04:40 +0100
commit75f2a0b4ef721b135c42d8e08d70bbdd0ed04c4c (patch)
treea6dca5a8babb7fedc2ac89609bc59c8a3fd89235 /src/widgets/graphicsview/qgraphicsscene.h
parentf0f5beb0e5db5538b38f07e6ecab89cc292ef609 (diff)
Extend selections in QGraphicsView when selection extension key down
If the user has some objects selected and holds down the "extend selection" key (Control on Windows, Command on Mac OS X), clicking and dragging a rubber band selection deselects the current selection. This is counter-intuitive and confusing for users. This commit fixes the behavior so users can extend selections using the rubber band when the proper key is held down. Task-number: QTBUG-6523 Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsscene.h')
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h
index 6cd5da00c8..03df18fbce 100644
--- a/src/widgets/graphicsview/qgraphicsscene.h
+++ b/src/widgets/graphicsview/qgraphicsscene.h
@@ -177,6 +177,8 @@ public:
QPainterPath selectionArea() const;
void setSelectionArea(const QPainterPath &path, const QTransform &deviceTransform);
void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, const QTransform &deviceTransform = QTransform());
+ void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionOperation selectionOperation, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, const QTransform &deviceTransform = QTransform());
+ // ### Qt6 merge the last 2 functions and add a default: Qt::ItemSelectionOperation selectionOperation = Qt::ReplaceSelection
QGraphicsItemGroup *createItemGroup(const QList<QGraphicsItem *> &items);
void destroyItemGroup(QGraphicsItemGroup *group);