mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
#13392 Summary Plot: Wrong values for "Time From Simulation Start"
The ensemble curve values are cached for performance reasons. Include the time settings in the hash function used to control the cache. This will make sure that the curve values are recreated when the time setting changes.
This commit is contained in:
1 parent
5bb431ef33
commit
2d4df3abf4
1 file changed
+11
-3
@@ -53,6 +53,7 @@
|
||||
#include "RimSummaryEnsemble.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryTimeAxisProperties.h"
|
||||
#include "RimTimeAxisAnnotation.h"
|
||||
#include "RimTimeStepFilter.h"
|
||||
|
||||
@@ -2119,9 +2120,16 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vector<RimSummaryCase
|
||||
|
||||
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
|
||||
|
||||
auto yAddressText = m_yValuesSummaryAddress()->address().toEclipseTextAddress();
|
||||
auto xAddressText = m_xAddressSelector->summaryAddress().toEclipseTextAddress();
|
||||
auto newRealizationHash = RiaHashTools::hash( sumCases, yAddressText, xAddressText );
|
||||
auto yAddressText = m_yValuesSummaryAddress()->address().toEclipseTextAddress();
|
||||
auto xAddressText = m_xAddressSelector->summaryAddress().toEclipseTextAddress();
|
||||
int timeMode = 0;
|
||||
auto timeScale = 0.0;
|
||||
if ( auto timeAxisProps = plot->timeAxisProperties() )
|
||||
{
|
||||
timeMode = std::to_underlying( timeAxisProps->timeMode() );
|
||||
timeScale = timeAxisProps->fromTimeTToDisplayUnitScale();
|
||||
}
|
||||
auto newRealizationHash = RiaHashTools::hash( sumCases, yAddressText, xAddressText, timeMode, timeScale );
|
||||
if ( newRealizationHash != m_realizationHash )
|
||||
{
|
||||
deleteEnsembleCurves();
|
||||
|
||||
Reference in new issue
Block a user