diff options
author | Andy Maloney <asmaloney@gmail.com> | 2015-01-04 13:41:25 -0500 |
---|---|---|
committer | Andy Maloney <asmaloney@gmail.com> | 2015-01-13 13:04:40 +0100 |
commit | 75f2a0b4ef721b135c42d8e08d70bbdd0ed04c4c (patch) | |
tree | a6dca5a8babb7fedc2ac89609bc59c8a3fd89235 /src/corelib | |
parent | f0f5beb0e5db5538b38f07e6ecab89cc292ef609 (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/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.h | 6 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index e239a11cda..fccb0d5421 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -73,6 +73,7 @@ Qt { Q_ENUMS(TextInteractionFlag) Q_FLAGS(TextInteractionFlags) Q_ENUMS(ItemSelectionMode) + Q_ENUMS(ItemSelectionOperation) Q_FLAGS(ItemFlags) Q_ENUMS(CheckState) Q_ENUMS(SortOrder CaseSensitivity) @@ -1298,6 +1299,11 @@ public: IntersectsItemBoundingRect = 0x3 }; + enum ItemSelectionOperation { + ReplaceSelection, + AddToSelection + }; + enum TransformationMode { FastTransformation, SmoothTransformation diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 04055a3308..4b582642f3 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2234,6 +2234,21 @@ */ /*! + \enum Qt::ItemSelectionOperation + + This enum is used in QGraphicsScene to specify what to do with currently selected + items when setting a selection area. + + \value ReplaceSelection The currently selected items are replaced by items + in the selection area. + + \value AddToSelection The items in the selection area are added to the currently + selected items. + + \sa QGraphicsScene::setSelectionArea() +*/ + +/*! \enum Qt::FillRule Specifies which method should be used to fill the paths and polygons. |