diff options
author | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2018-12-03 15:54:22 +0200 |
---|---|---|
committer | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2018-12-03 15:25:59 +0000 |
commit | 2ba5f4d873a1fb04b891238f78868778fd4bc20f (patch) | |
tree | b6da3f9730fcc1600664b5e189ed4c62d9704ee7 /src/Authoring/Studio/Palettes/Inspector | |
parent | 5a476f2d888aab2eb4a5c847af6be3d4e1cca727 (diff) |
Ignore matdef changes triggered by the editor
After the editor saves a materialdef file, the editor doesn't need to
react to that change.
Change-Id: I4fa5fd79536388450ccb39d2ff55eab53f11a04b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector')
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp index 33ca1461..c593dea1 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp @@ -511,14 +511,19 @@ void InspectorControlModel::setMaterials(std::vector<Q3DStudio::CFilePath> &mate void InspectorControlModel::setMatDatas(const std::vector<Q3DStudio::CFilePath> &matDatas) { - m_matDatas.clear(); - const auto doc = g_StudioApp.GetCore()->GetDoc(); bool isDocModified = doc->IsModified(); const auto sceneEditor = doc->getSceneEditor(); if (!sceneEditor) return; + if (sceneEditor->isIgnoringNextMaterialDefChange()) { + sceneEditor->stopIgnoringNextMaterialDefChange(); + return; + } + + m_matDatas.clear(); + bool newMaterialSelected = false; for (const Q3DStudio::CFilePath &path : matDatas) { bool isNewFile = true; |