From af89f3e45eef72319fdd696d3a2f71af6b8107e0 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 19 Aug 2014 10:57:55 +0200 Subject: [PATCH] Use icon update functions from pdmDocument --- ApplicationCode/ProjectDataModel/RimCase.cpp | 2 +- ApplicationCode/ProjectDataModel/RimUiTreeModelPdm.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimCase.cpp b/ApplicationCode/ProjectDataModel/RimCase.cpp index 66178129ec..f7561fb37d 100644 --- a/ApplicationCode/ProjectDataModel/RimCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimCase.cpp @@ -138,7 +138,7 @@ RimReservoirView* RimCase::createAndAddReservoirView() RimReservoirView* riv = new RimReservoirView(); riv->setEclipseCase(this); - caf::PdmDocument::initAfterReadTraversal(riv); + caf::PdmDocument::updateUiIconStateRecursively(riv); size_t i = reservoirViews().size(); riv->name = QString("View %1").arg(i + 1); diff --git a/ApplicationCode/ProjectDataModel/RimUiTreeModelPdm.cpp b/ApplicationCode/ProjectDataModel/RimUiTreeModelPdm.cpp index dc340cb014..14f14e9ed1 100644 --- a/ApplicationCode/ProjectDataModel/RimUiTreeModelPdm.cpp +++ b/ApplicationCode/ProjectDataModel/RimUiTreeModelPdm.cpp @@ -678,7 +678,7 @@ void RimUiTreeModelPdm::addObjects(const QModelIndex& itemIndex, caf::PdmObjectG RimAnalysisModels* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL; if (analysisModels) analysisModels->insertCaseInCaseGroup(gridCaseGroup, rimResultReservoir); - caf::PdmObjectGroup::initAfterReadTraversal(rimResultReservoir); + caf::PdmDocument::updateUiIconStateRecursively(rimResultReservoir); { QModelIndex rootIndex = getModelIndexFromPdmObject(gridCaseGroup->caseCollection()); @@ -723,7 +723,7 @@ void RimUiTreeModelPdm::addObjects(const QModelIndex& itemIndex, caf::PdmObjectG // Delete all wells to be able to copy/paste between cases, as the wells differ between cases rimReservoirView->wellCollection()->wells().deleteAllChildObjects(); - caf::PdmObjectGroup::initAfterReadTraversal(rimReservoirView); + caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView); rimReservoirView->loadDataAndUpdate(); rimCase->reservoirViews().push_back(rimReservoirView);