From b7693f449bc154dc880fce8214b1895858818dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Wed, 20 Aug 2014 11:32:50 +0200 Subject: [PATCH] Fixed missing result names when auto SOIL is off --- .../ProjectDataModel/RimReservoirView.cpp | 23 ++++++++++++------- .../RigCaseCellResultsData.cpp | 2 +- .../RigCaseCellResultsData.h | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp index 77150dc4c6..9edd98f1a7 100644 --- a/ApplicationCode/ProjectDataModel/RimReservoirView.cpp +++ b/ApplicationCode/ProjectDataModel/RimReservoirView.cpp @@ -916,19 +916,26 @@ void RimReservoirView::loadDataAndUpdate() else { RiaApplication* app = RiaApplication::instance(); - if (app->preferences()->autocomputeSOIL) + { + RimReservoirCellResultsStorage* results = m_reservoir->results(RifReaderInterface::MATRIX_RESULTS); + if (results->cellResults()) results->cellResults()->createPlaceholderResultEntries(); + + if (app->preferences()->autocomputeSOIL) { - RimReservoirCellResultsStorage* results = m_reservoir->results(RifReaderInterface::MATRIX_RESULTS); results->loadOrComputeSOIL(); - if (results->cellResults()) results->cellResults()->createPerFaceCombinedResults(); - } - { - RimReservoirCellResultsStorage* results = m_reservoir->results(RifReaderInterface::FRACTURE_RESULTS); - results->loadOrComputeSOIL(); - if (results->cellResults()) results->cellResults()->createPerFaceCombinedResults(); } } + { + RimReservoirCellResultsStorage* results = m_reservoir->results(RifReaderInterface::FRACTURE_RESULTS); + if (results->cellResults()) results->cellResults()->createPlaceholderResultEntries(); + + if (app->preferences()->autocomputeSOIL) + { + results->loadOrComputeSOIL(); + } + } + } } diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index c008039c77..331aa53c55 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -510,7 +510,7 @@ void RigCaseCellResultsData::setMustBeCalculated(size_t scalarResultIndex) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RigCaseCellResultsData::createPerFaceCombinedResults() +void RigCaseCellResultsData::createPlaceholderResultEntries() { { size_t combinedTransmissibilityIndex = findScalarResultIndex(RimDefines::STATIC_NATIVE, RimDefines::combinedTransmissibilityResultName()); diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h index b2116f1713..b236bc4b1b 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.h @@ -70,7 +70,7 @@ public: size_t addEmptyScalarResult(RimDefines::ResultCatType type, const QString& resultName, bool needsToBeStored); QString makeResultNameUnique(const QString& resultNameProposal) const; - void createPerFaceCombinedResults(); + void createPlaceholderResultEntries(); void removeResult(const QString& resultName); void clearAllResults();