diff options
author | Janne Kangas <janne.kangas@qt.io> | 2020-03-13 14:48:25 +0200 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2020-03-24 07:10:36 +0200 |
commit | 8065d16d4b63d428aa712e8d83848898e3054184 (patch) | |
tree | cc3f49852fb94f7f39fc2102d5df19639c69754c /src/Authoring/Qt3DStudio/Palettes | |
parent | 083e4516a60252d842fb264ac995ca9b92cc71ba (diff) |
Force immediate render after files change
Force rendering to keep edit camera view and scene camera views in sync
after shader recompilation.
Also only clear shader error if object has valid translation.
Task-id: QT3DS-4045
Change-Id: I5f3e6feab41f56c00c9bb8190263e73510c04309
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Qt3DStudio/Palettes')
-rw-r--r-- | src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp | 3 | ||||
-rw-r--r-- | src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp index 09f7f5e0..aaeb7a89 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlModel.cpp @@ -925,7 +925,8 @@ void InspectorControlModel::updateValidState(InspectorControlBase *inItem) const // Check the validity of shader. if (inItem->m_title == tr("Shader")) { - auto err = g_StudioApp.getRenderer().getObjectError(inItem->m_instance); + QString err; + g_StudioApp.getRenderer().getObjectError(inItem->m_instance, err); if (!err.isEmpty()) { inItem->m_tooltip = err; inItem->m_valid = false; diff --git a/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp b/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp index 77a2a24a..9d608276 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Project/ProjectFileSystemModel.cpp @@ -253,11 +253,12 @@ void ProjectFileSystemModel::checkShaders(const int startRow, const int endRow) if (currRow >= startRow && startRow == -1 && currRow <= endRow) continue; - auto err = g_StudioApp.getRenderer().getObjectError(instance); + QString err; + auto res = g_StudioApp.getRenderer().getObjectError(instance, err); if (!err.isEmpty() && currRow != -1) m_items[currRow].error = bridge->GetSourcePath(instance) + QStringLiteral("\n\n") + err; - else if (currRow != -1) + else if (currRow != -1 && res) m_items[currRow].error = QString(); } } |