From b1e215a2dfd9bb255126350e954b5fae666d4045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Tue, 12 Feb 2019 12:48:11 +0100 Subject: Fix data input for changing slides in nested components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed useless check that tested if the component was on the master or current slide, as that's not necessarily the case when you have nested components. Fixes: QT3DS-3033 Change-Id: I0af07a36ee7db62c355434ecdf8ee351a1fef505 Reviewed-by: Laszlo Agocs (cherry picked from commit bad87a705817355996c8265f5424beae39948e86) Reviewed-by: Christian Strømme --- src/runtime/q3dsscenemanager.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/runtime/q3dsscenemanager.cpp b/src/runtime/q3dsscenemanager.cpp index 60cf6ec..b2fc907 100644 --- a/src/runtime/q3dsscenemanager.cpp +++ b/src/runtime/q3dsscenemanager.cpp @@ -9227,14 +9227,10 @@ void Q3DSSceneManager::changeSlideByName(Q3DSGraphObject *sceneOrComponent, cons }); if (targetSlide) { - if (component) { - if (m_currentSlide->objects().contains(component) || m_masterSlide->objects().contains(component)) - setComponentCurrentSlide(targetSlide); - else - component->setCurrentSlide(targetSlide); - } else { + if (component) + setComponentCurrentSlide(targetSlide); + else setCurrentSlide(targetSlide); - } } else { qWarning("changeSlideByName: Slide %s not found on %s", qPrintable(name), sceneOrComponent->id().constData()); } -- cgit v1.2.3