aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickdrag.cpp
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2016-04-12 23:14:46 +0300
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-04-26 08:27:08 +0000
commit9cf3895f4dbb5d0678e2030316c1693581f754c9 (patch)
tree3e1bb611b721ea8e1aa45b0435db719f35263483 /src/quick/items/qquickdrag.cpp
parent2e6f7f362e62c3285e7d395aca607502c8e8160e (diff)
QQuickDragAttached: fix updating of "active" property
The d->active member variable should be changed regardless of the value of Drag.dragType. Task-number: QTBUG-52540 Change-Id: I7fa39ccf11b1200e9c2f6fe57cba58657b6cff74 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickdrag.cpp')
-rw-r--r--src/quick/items/qquickdrag.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index 7e1ffb6b7e..e1b7ef47d8 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -300,13 +300,14 @@ void QQuickDragAttached::setActive(bool active)
else if (active) {
if (d->dragType == QQuickDrag::Internal) {
d->start(d->supportedActions);
- }
- else if (d->dragType == QQuickDrag::Automatic) {
- // There are different semantics than start() since startDrag()
- // may be called after an internal drag is already started.
+ } else {
d->active = true;
emit activeChanged();
- d->startDrag(d->supportedActions);
+ if (d->dragType == QQuickDrag::Automatic) {
+ // There are different semantics than start() since startDrag()
+ // may be called after an internal drag is already started.
+ d->startDrag(d->supportedActions);
+ }
}
}
else