diff options
author | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2018-11-15 15:16:27 +0200 |
---|---|---|
committer | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2018-11-15 14:23:17 +0000 |
commit | 71a9b8410966c324258bacebce42a3385f2c22b1 (patch) | |
tree | 935ff1428cafffd6a50e27be4074a775ee7580cc | |
parent | c44dd8db34ac0e81b30b9ddd127fed2b4f4d6c1f (diff) |
Keep matdef saved path up to date
Task-number: QT3DS-2108
Change-Id: Ie3af8dc0ce67f0bdcc50131cc917dbd02f8f08ab
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp index ef6eb486..2e670794 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp @@ -457,6 +457,7 @@ void InspectorControlModel::setMatDatas(const std::vector<Q3DStudio::CFilePath> bool needRewrite = false; if (values.contains(QStringLiteral("path"))) { const QString oldPath = values[QStringLiteral("path")]; + needRewrite = oldPath != absolutePath.toQString(); if (!QFileInfo(oldPath).exists()) { const auto instance = sceneEditor->getMaterial(oldPath); if (instance.Valid()) { @@ -464,7 +465,6 @@ void InspectorControlModel::setMatDatas(const std::vector<Q3DStudio::CFilePath> sceneEditor->GetName(instance).toQString()); if (actualPath == oldPath) { sceneEditor->setMaterialNameByPath(instance, relativePath); - needRewrite = true; QVector<qt3dsdm::Qt3DSDMInstanceHandle> refMats; doc->getSceneReferencedMaterials(doc->GetSceneInstance(), refMats); |