diff options
Diffstat (limited to 'src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r-- | src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlView.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlView.cpp index f956021e..f991f467 100644 --- a/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlView.cpp +++ b/src/Authoring/Qt3DStudio/Palettes/Inspector/InspectorControlView.cpp @@ -88,6 +88,13 @@ InspectorControlView::InspectorControlView(const QSize &preferredSize, QWidget * dispatch->AddPresentationChangeListener(this); dispatch->AddDataModelListener(this); + m_shaderStatusUpdateTimer.setSingleShot(true); + m_shaderStatusUpdateTimer.setInterval(3000); + + connect(&m_shaderStatusUpdateTimer, &QTimer::timeout, [&](){ + m_inspectorControlModel->refresh(); + }); + connect(m_meshChooserView, &MeshChooserView::meshSelected, this, [this] (int handle, int instance, const QString &name) { if (name.startsWith(QLatin1Char('#'))) { @@ -170,6 +177,9 @@ void InspectorControlView::onFilesChanged( L"material", L"shader", L"materialdef", nullptr }; + static const wchar_t *effectExtensions[] = { + L"effect", nullptr + }; static const wchar_t *fontExtensions[] = { L"ttf", L"otf", nullptr @@ -189,6 +199,8 @@ void InspectorControlView::onFilesChanged( qt3dsdm::binary_sort_insert_unique(m_fileList, relativePath); else if (record.m_ModificationType == Q3DStudio::FileModificationType::Destroyed) qt3dsdm::binary_sort_erase(m_fileList, relativePath); + else + m_shaderStatusUpdateTimer.start(); } else if (isInList(fontExtensions, record.m_File.GetExtension())) { if (record.m_ModificationType == Q3DStudio::FileModificationType::Created || record.m_ModificationType == Q3DStudio::FileModificationType::Destroyed) { @@ -200,6 +212,8 @@ void InspectorControlView::onFilesChanged( g_StudioApp.GetCore()->getProjectFile().loadSubpresentationsAndDatainputs( g_StudioApp.m_subpresentations, g_StudioApp.m_dataInputDialogItems); m_inspectorControlModel->refreshRenderables(); + } else if (isInList(effectExtensions, record.m_File.GetExtension())) { + m_shaderStatusUpdateTimer.start(); } } } |