From 8a5a8ec2d6cc1cadaafaeed922abc96a2599fa6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Fri, 25 Sep 2020 10:03:18 +0300 Subject: Reset layer after adding/duplicating slide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä Reviewed-by: Tomi Korpipää --- src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Authoring') 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; } -- cgit v1.2.3