From 4e6d6414571343c20780dcc16bb9d43fc93aa10e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 10 Jan 2020 19:46:53 +0100 Subject: [PATCH] #5307 Show Plot Data : Fix time step values for calculated summary vectors --- .../ProjectDataModel/Summary/RimSummaryPlot.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index 7321548e10..eec086a2e1 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -2197,8 +2197,13 @@ void populateSummaryCurvesData( std::vector curves, SummaryCur errorCurveData.values = errorValues; } - if ( casePosInList == cvf::UNDEFINED_SIZE_T ) + if ( casePosInList == cvf::UNDEFINED_SIZE_T || + curve->summaryAddressY().category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED ) { + // Create a section with separate time axis data if + // 1. Case is not referenced before, or + // 2. We have calculated data, and it we cannot assume identical time axis + auto curveDataList = std::vector( {curveData} ); if ( hasErrorData ) curveDataList.push_back( errorCurveData ); @@ -2208,6 +2213,8 @@ void populateSummaryCurvesData( std::vector curves, SummaryCur } else { + // Append curve data to previously created curvesdata object + curvesData->allCurveData[casePosInList].push_back( curveData ); if ( hasErrorData ) curvesData->allCurveData[casePosInList].push_back( errorCurveData ); }