summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Client/Code/Core/Doc/ComposerEditorInterface.cpp')
-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);