mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5131 : Calculated curves : Use find in RimSummaryCalculationCollection
This commit is contained in:
committed by
Kristian Bendiksen
parent
532d5899de
commit
1628f01939
@@ -18,11 +18,15 @@
|
||||
|
||||
#include "RimSummaryCurveAutoName.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaStatisticsTools.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCalculation.h"
|
||||
#include "RimSummaryCalculationCollection.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
@@ -197,6 +201,18 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
|
||||
QString::fromStdString( summaryAddress.quantityName() ) )
|
||||
.toStdString();
|
||||
}
|
||||
else if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
|
||||
{
|
||||
// Need to add case name for calculated summary
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimSummaryCalculationCollection* calcColl = proj->calculationCollection();
|
||||
|
||||
RimSummaryCalculation* calculation = calcColl->findCalculationById( summaryAddress.id() );
|
||||
if ( calculation )
|
||||
{
|
||||
text = calculation->description().toStdString();
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_unit && !unitText.empty() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user