From 5f8471a92868a06298ef0e0f1047d20491ac7f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Fri, 2 Oct 2020 08:16:38 +0300 Subject: Fix slide activity changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When doing multiple slide switches at the same frame, activity (visibility) didn't update correctly because even empty elements caused activity changes. Task-number: QT3DS-4169 Change-Id: Ib2dec31ee6b33487261b73cf5550a090ce91513e Reviewed-by: Antti Määttä Reviewed-by: Tomi Korpipää --- src/runtime/Qt3DSSlideSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runtime/Qt3DSSlideSystem.cpp b/src/runtime/Qt3DSSlideSystem.cpp index 4eaa698..4cdce28 100644 --- a/src/runtime/Qt3DSSlideSystem.cpp +++ b/src/runtime/Qt3DSSlideSystem.cpp @@ -457,6 +457,11 @@ struct SSlideSystem : public ISlideSystem if (!theElem) { QT3DS_ASSERT(false); } else { + // If slide element doesn't contain any attributes, don't continue + // even to activity change. + if (theElement->m_AttributeCount == 0) + continue; + if (inOp.handleElementActive(*theElem, theElement->m_Active)) { for (TSlideAttributeNodeList::const_iterator iter = TSlideAttributeNodeList::begin(theElement->m_AttributeNodes, -- cgit v1.2.3