summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2018-11-23 15:40:02 +0200
committerJere Tuliniemi <jere.tuliniemi@qt.io>2018-11-26 13:08:33 +0000
commit7938d4234b928f96bfefcfb03acdec92adfdb469 (patch)
tree1af0354f327bc29ea45d4d4a93175779f0030332
parent06498355471227722dcf9be936776f6dcb5a1e04 (diff)
Fix refresh import moving materialsv2.2.0-beta2
Also, use source path as an identifier instead of the material name. Task-number: QT3DS-2108 Change-Id: I72f7a0e15cc84034b20baea98208c2b939550010 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp b/src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp
index 6e1aa2fa..a6ac8e29 100644
--- a/src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp
@@ -614,7 +614,7 @@ struct SComposerRefreshInterface : public SComposerImportBase, public IComposerE
m_Editor.GetChildren(0, parent, children);
Qt3DSDMInstanceHandle oldVersion;
for (auto &child : children) {
- if (m_Editor.GetName(child) == materialName
+ if (m_Editor.GetSourcePath(child) == sourcePath
&& m_Editor.GetObjectTypeName(child) == "ReferencedMaterial") {
oldVersion = child;
break;
@@ -716,6 +716,8 @@ struct SComposerRefreshInterface : public SComposerImportBase, public IComposerE
Qt3DSDMSlideHandle theParentSlide = theParentList->second[idx].first;
Qt3DSDMInstanceHandle theParent(theParentList->second[idx].second);
Qt3DSDMInstanceHandle theChild(theChildList->second[idx].second);
+ if (m_createdMaterials.contains(theChild))
+ continue;
Qt3DSDMInstanceHandle nextSibling;
if (!IsTrivial(nextSiblingId)) {
for (long childIdx = 0, childCount = m_AssetGraph.GetChildCount(theParent);