mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2022 Curve Calculator : Make sure calculated summary case is always present
This commit is contained in:
@@ -164,17 +164,16 @@ void RimCalculatedSummaryCase::RifCalculatedSummaryCurveReader::buildMetaData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCalculation* RimCalculatedSummaryCase::RifCalculatedSummaryCurveReader::findCalculationByName(const RifEclipseSummaryAddress& resultAddress) const
|
||||
{
|
||||
if (!m_calculationCollection) return false;
|
||||
|
||||
CVF_ASSERT(resultAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED);
|
||||
|
||||
QString calculatedName = QString::fromStdString(resultAddress.quantityName());
|
||||
|
||||
for (RimCalculation* calc : m_calculationCollection->calculations())
|
||||
if (m_calculationCollection && resultAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED)
|
||||
{
|
||||
if (calc->description() == calculatedName)
|
||||
QString calculatedName = QString::fromStdString(resultAddress.quantityName());
|
||||
|
||||
for (RimCalculation* calc : m_calculationCollection->calculations())
|
||||
{
|
||||
return calc;
|
||||
if (calc->description() == calculatedName)
|
||||
{
|
||||
return calc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user