From bc6414762e48f12f6680ee6bb667c49c64fbd32a Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 12 Dec 2016 16:25:40 +0100 Subject: Material: prevent ripples from getting stuck in disabled state Ripples don't trigger when the ripple item itself is disabled. This is used in SwipeDelegate to prevent ripples when a swipe is open. Now that swipe.position is transitioned, a release event comes before the swipe position reaches 0, so we must ensure that the wave exits even if it's not yet enabled. Change-Id: Ib4d58ff974262331898db2133e06624eb890f9ed Reviewed-by: Mitch Curtis --- src/imports/controls/material/qquickmaterialripple.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/imports/controls/material') diff --git a/src/imports/controls/material/qquickmaterialripple.cpp b/src/imports/controls/material/qquickmaterialripple.cpp index 837dd760..f4dca135 100644 --- a/src/imports/controls/material/qquickmaterialripple.cpp +++ b/src/imports/controls/material/qquickmaterialripple.cpp @@ -288,8 +288,10 @@ void QQuickMaterialRipple::setPressed(bool pressed) m_pressed = pressed; - if (!isEnabled()) + if (!isEnabled()) { + exitWave(); return; + } if (pressed) { if (m_trigger == Press) -- cgit v1.2.3