#5307 Show Plot Data : Fix time step values for calculated summary vectors

This commit is contained in:
Magne Sjaastad 2020-01-10 19:46:53 +01:00
parent 89c306cb5a
commit ac752421f1

View File

@ -2169,8 +2169,13 @@ void populateSummaryCurvesData( std::vector<RimSummaryCurve*> 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>( {curveData} );
if ( hasErrorData ) curveDataList.push_back( errorCurveData );
@ -2180,6 +2185,8 @@ void populateSummaryCurvesData( std::vector<RimSummaryCurve*> 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 );
}