diff options
author | Marco Martin <notmart@gmail.com> | 2016-09-28 19:25:41 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-09-28 18:28:16 +0000 |
commit | c56b68bd76a0a608824054e09ec6e9ab34295188 (patch) | |
tree | 055f696c9ca80b272f9e71fb9dd9a45bfa5498bb | |
parent | bde0f36262987b244d215bc10f68b09e4a380660 (diff) |
Don't execute disabled transitions
If an enter or exit transition for a Drawer is disabled, don't
execute it at all when the drawer gets opened or closed. This
besides being more semantically correct, makes possible to control
manually the opening of a Drawer, for instance to implement an
external handle with which is possible to drag the drawer open or close.
If a Transition is disabled, is up to the caller to set correctly the
position value.
Change-Id: I5a0d96e3b7c948725dff2068f9d0a7ab1d3847e9
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | src/quicktemplates2/qquickdrawer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp index 8319cf2c..d35b30cf 100644 --- a/src/quicktemplates2/qquickdrawer.cpp +++ b/src/quicktemplates2/qquickdrawer.cpp @@ -422,7 +422,7 @@ bool QQuickDrawerPrivate::handleMouseReleaseEvent(QQuickItem *item, QMouseEvent static QList<QQuickStateAction> prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to) { QList<QQuickStateAction> actions; - if (!transition || !QQuickPopupPrivate::get(drawer)->window) + if (!transition || !QQuickPopupPrivate::get(drawer)->window || !transition->enabled()) return actions; qmlExecuteDeferred(transition); |