summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2020-09-25 10:03:18 +0300
committerKaj Grönholm <kaj.gronholm@qt.io>2020-09-25 14:12:46 +0300
commit8a5a8ec2d6cc1cadaafaeed922abc96a2599fa6c (patch)
tree9d58655d8795f0b8ca78c93c686fb85e2b530477
parent8931cf0a7b29d5769539c770c79b1b72a8bd86a1 (diff)
Reset layer after adding/duplicating slide
Not doing this caused issues in axis helper and also in other cases. Task-number: QT3DS-4170 Change-Id: Ib095a205205c88e9239aacffbf1a33c6ad08b136 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
index 4e996a13..39e74736 100644
--- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
@@ -3598,6 +3598,8 @@ public:
int newSlideIndex = m_SlideSystem.GetSlideIndex(theNewSlide);
m_SlideSystem.SetActiveSlide(inMasterSlide, newSlideIndex);
m_Doc.NotifyActiveSlideChanged(theNewSlide, true);
+ // Make sure layer is reseted
+ m_Doc.SetActiveLayer(0);
CheckSlideGroupPlayThroughTo(theNewSlide);
Qt3DSDMInstanceHandle theInstance = m_Doc.GetSelectedInstance();
if (theInstance.Valid() && GetAssociatedSlide(theInstance) != inMasterSlide)
@@ -3681,6 +3683,8 @@ public:
m_Doc.SetActiveSlideWithTransaction(theNewSlide);
m_Doc.NotifyActiveSlideChanged(theNewSlide, true);
+ // Make sure layer is reseted
+ m_Doc.SetActiveLayer(0);
CheckSlideGroupPlayThroughTo(theNewSlide);
return theNewSlide;
}