mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10438 Fix stacking of curves
This was a side effect of changes in 69a668d
The return value when accessing time step values changed from const std::vector<time_t>& to std::vector<time_t>. When computing data related to stacking of curves, the data was inserted into a vector, and the change caused the insert operation to use two different vectors instead of one.
This commit is contained in:
parent
c7032c60d2
commit
8a41d5a085
@ -1747,7 +1747,12 @@ bool RimSummaryPlot::updateStackedCurveDataForAxis( RiuPlotAxis plotAxis )
|
||||
std::vector<time_t> allTimeSteps;
|
||||
for ( RimSummaryCurve* curve : stackedCurves )
|
||||
{
|
||||
allTimeSteps.insert( allTimeSteps.end(), curve->timeStepsY().begin(), curve->timeStepsY().end() );
|
||||
auto timeSteps = curve->timeStepsY();
|
||||
if ( !timeSteps.empty() )
|
||||
{
|
||||
// https://github.com/OPM/ResInsight/issues/10438
|
||||
allTimeSteps.insert( allTimeSteps.end(), timeSteps.begin(), timeSteps.end() );
|
||||
}
|
||||
}
|
||||
std::sort( allTimeSteps.begin(), allTimeSteps.end() );
|
||||
allTimeSteps.erase( std::unique( allTimeSteps.begin(), allTimeSteps.end() ), allTimeSteps.end() );
|
||||
|
Loading…
Reference in New Issue
Block a user