summaryrefslogtreecommitdiffstats
path: root/src/Authoring/QT3DSDM/Systems/SlideSystem.cpp
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2018-09-28 10:55:42 +0300
committerJere Tuliniemi <jere.tuliniemi@qt.io>2018-10-11 06:36:48 +0000
commitf66c71e16eb58e3819c8ae90bef8448568436912 (patch)
tree3f1e4c1f7f73c339eb1f38bd536f00e33feb8654 /src/Authoring/QT3DSDM/Systems/SlideSystem.cpp
parentfe04c1301a1a6865fc96ee3a561696015ba3a1ae (diff)
Fix copying when changing from ref to standard mat
When a material was copied, the textures of the new material were still the children of the original material. In addition, copied properties weren't saved to the uip file. Task-number: QT3DS-2399 Change-Id: I644c175b2fb0eafcc0dde4831f10ae95affac308 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/QT3DSDM/Systems/SlideSystem.cpp')
-rw-r--r--src/Authoring/QT3DSDM/Systems/SlideSystem.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Authoring/QT3DSDM/Systems/SlideSystem.cpp b/src/Authoring/QT3DSDM/Systems/SlideSystem.cpp
index f74ec337..d6d88932 100644
--- a/src/Authoring/QT3DSDM/Systems/SlideSystem.cpp
+++ b/src/Authoring/QT3DSDM/Systems/SlideSystem.cpp
@@ -795,6 +795,19 @@ ISlideSystemSignalSender *SSlideSystem::GetSignalSender()
return dynamic_cast<ISlideSystemSignalSender *>(m_Signaller.get());
}
+qt3dsdm::Qt3DSDMSlideHandle SSlideSystem::GetApplicableSlide(Qt3DSDMInstanceHandle inHandle)
+{
+ TGraphSlidePair theGraphSlidePair = m_SlideGraphCore->GetAssociatedGraph(inHandle);
+ if (!theGraphSlidePair.first.Valid())
+ return Qt3DSDMSlideHandle();
+
+ Qt3DSDMSlideHandle theMaster = m_SlideGraphCore->GetGraphRoot(theGraphSlidePair.first);
+ if (theGraphSlidePair.second != theMaster)
+ return theGraphSlidePair.second;
+
+ return theMaster;
+}
+
qt3dsdm::Qt3DSDMSlideHandle SSlideSystem::GetApplicableSlide(Qt3DSDMInstanceHandle inHandle,
Qt3DSDMPropertyHandle inProperty)
{