diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2019-10-14 08:58:16 +0300 |
---|---|---|
committer | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2019-10-14 10:54:11 +0300 |
commit | efb19fb7e16bdebe9e3db792dd9eb285be982644 (patch) | |
tree | 61724813db54e381c16754528f059335f51725ad | |
parent | 9c36497bccbe3f84b521820e308050cabd7862ef (diff) |
Fix texture path corruption
Task-number: QT3DS-3986
Change-Id: I41613e6761d15e299d995a529f2013240edefc25
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp index 0324aa20..dc60eeb4 100644 --- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp +++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp @@ -5551,8 +5551,7 @@ void IDocumentEditor::fixDefaultTexturePaths(Qt3DSDMInstanceHandle instance) TDataStrPtr strPtr = get<TDataStrPtr>(value); const QString strValue = QString::fromWCharArray(strPtr->GetData()); const QString docRelative = docDir.relativeFilePath(strValue); - const QString projRelative = projDir.relativeFilePath(strValue); - if (!QFileInfo(docRelative).exists() && !QFileInfo(projRelative).exists()) { + if (!QFileInfo(docDir.filePath(docRelative)).exists()) { // Convert path to presentation relative const QVariant newVarValue = QVariant::fromValue( docDir.relativeFilePath(projDir.absoluteFilePath(strValue))); |