summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp')
-rw-r--r--src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
index 56fb7a88..c4d49ade 100644
--- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
@@ -1839,6 +1839,14 @@ public:
if (!img)
img = CreateImageInstanceForMaterialOrLayer(instance, prop);
+ // When a matdef is first created the source path is not set properly
+ // when setting a subpresentation so we set it here manually
+ // TODO: Replace this with an actual fix
+ if (m_Bridge.isInsideMaterialContainer(instance)) {
+ SetInstancePropertyValue(img, m_Bridge.GetSourcePathProperty(),
+ std::make_shared<qt3dsdm::CDataStr>(src.c_str()));
+ }
+
SetInstancePropertyValueAsRenderable(img, isSubp ? m_Bridge.getSubpresentationProperty()
: m_Bridge.GetSourcePathProperty(), src);
}