diff options
Diffstat (limited to 'src/Authoring/Client/Code/Core/Doc/Doc.cpp')
-rw-r--r-- | src/Authoring/Client/Code/Core/Doc/Doc.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp index 09e5910c..14f0a77a 100644 --- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp +++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp @@ -1296,7 +1296,9 @@ void CDoc::onPropertyChanged(qt3dsdm::Qt3DSDMInstanceHandle inInstance, = sceneEditor->getFilePathFromMaterialName(materialRename.second); // If the newfile already exists ie. file was renamed manually by the user, // rename the referenced materials regardless - if (QFileInfo(newFile).exists() || QFile::rename(oldFile, newFile)) { + if (QFileInfo(oldFile).exists()) + QFile::rename(oldFile, newFile); + if (QFileInfo(newFile).exists()) { const QString newRelPath = QDir(dirPath).relativeFilePath(newFile); QVector<qt3dsdm::Qt3DSDMInstanceHandle> refMats; |