From 15b385af9f8e24e8c66588b55a3f7828d70d2c33 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 27 Sep 2024 15:43:32 +0800 Subject: Fix BusyIndicator being hidden when running is changed quickly If running is set to false and then true within a short period, BusyIndicatorImpl's OpacityAnimator cancels the 1 => 0 animation (which was for running being set to false), setting opacity to 0 and hence visible to false. This happens _after_ setRunning(true) was called, because the properties were set synchronously but the animation is asynchronous. To account for this situation, we only hide ourselves if we're not running by storing and checking our running state. Fixes: QTBUG-85860 Pick-to: 6.5 6.7 6.8 Change-Id: I220dfb78f00028e4a12a92fc14082006e1844002 Reviewed-by: Doris Verria --- src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h') diff --git a/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h b/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h index edf9d68078..f98e2a226c 100644 --- a/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h +++ b/src/quickcontrols/basic/impl/qquickbasicbusyindicator_p.h @@ -49,6 +49,7 @@ protected: QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; private: + bool m_running = false; int m_elapsed = 0; QColor m_pen; QColor m_fill; -- cgit v1.2.3