mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
#11857 Make sure the summary curve type is updated
Always compute curve type Rate or Accumulated based on address if Auto curve type is set.
This commit is contained in:
parent
1cbdbfa7df
commit
67e6df28b5
@ -100,7 +100,7 @@ void RiaSummaryTools::notifyCalculatedCurveNameHasChanged( int calculationId, co
|
||||
if ( adr.isCalculated() && adr.id() == calculationId )
|
||||
{
|
||||
adr.setVectorName( currentCurveName.toStdString() );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( adr );
|
||||
curve->setSummaryAddressY( adr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ RimSummaryCurve* RicPlotProductionRateFeature::addSummaryCurve( RimSummaryPlot*
|
||||
plot->addCurveAndUpdate( newCurve );
|
||||
|
||||
newCurve->setSummaryCaseY( summaryCase );
|
||||
newCurve->setSummaryAddressYAndApplyInterpolation( addr );
|
||||
newCurve->setSummaryAddressY( addr );
|
||||
newCurve->setColor( color );
|
||||
newCurve->setLeftOrRightAxisY( RiuPlotAxis( plotAxis ) );
|
||||
newCurve->loadDataAndUpdate( true );
|
||||
|
@ -532,7 +532,7 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
|
||||
curve->setShowInLegend( false );
|
||||
}
|
||||
curve->setSummaryCaseY( currentCase );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( curveDef.summaryAddressY() );
|
||||
curve->setSummaryAddressY( curveDef.summaryAddressY() );
|
||||
curve->applyCurveAutoNameSettings( *m_curveNameConfig() );
|
||||
if ( currentCase && currentCase->isObservedData() ) curve->setSymbolSkipDistance( 0 );
|
||||
|
||||
|
@ -689,7 +689,7 @@ RimSummaryCurve* RicSummaryPlotFeatureImpl::createCurve( RimSummaryCase* summary
|
||||
{
|
||||
auto curve = new RimSummaryCurve();
|
||||
curve->setSummaryCaseY( summaryCase );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( address );
|
||||
curve->setSummaryAddressY( address );
|
||||
|
||||
return curve;
|
||||
}
|
||||
|
@ -2056,7 +2056,7 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vector<RimSummaryCase
|
||||
{
|
||||
RimSummaryCurve* curve = new RimSummaryCurve();
|
||||
curve->setSummaryCaseY( sumCase );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( addr->address() );
|
||||
curve->setSummaryAddressY( addr->address() );
|
||||
curve->setResampling( m_resampling() );
|
||||
|
||||
int lineThickness = 1;
|
||||
@ -2259,7 +2259,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
}
|
||||
|
||||
curve->setSummaryCaseY( summaryCase );
|
||||
curve->setSummaryAddressYAndApplyInterpolation( address.summaryAddressY() );
|
||||
curve->setSummaryAddressY( address.summaryAddressY() );
|
||||
curve->setLeftOrRightAxisY( axisY() );
|
||||
|
||||
if ( isXAxisSummaryVector() )
|
||||
|
@ -244,16 +244,6 @@ RifEclipseSummaryAddress RimSummaryCurve::summaryAddressY() const
|
||||
return m_yValuesSummaryAddress->address();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurve::setSummaryAddressYAndApplyInterpolation( const RifEclipseSummaryAddress& address )
|
||||
{
|
||||
setSummaryAddressY( address );
|
||||
|
||||
calculateCurveInterpolationFromAddress();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -265,6 +255,10 @@ void RimSummaryCurve::setSummaryAddressY( const RifEclipseSummaryAddress& addres
|
||||
}
|
||||
|
||||
m_yValuesSummaryAddress->setAddress( address );
|
||||
|
||||
// Always calculate curve interpolation when address is changed
|
||||
// This will ensure that the curve type (Rate or Accumulated) is correctly set based on the address
|
||||
calculateCurveInterpolationFromAddress();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -65,7 +65,6 @@ public:
|
||||
virtual std::vector<double> valuesY() const;
|
||||
|
||||
void setSummaryCaseY( RimSummaryCase* sumCase );
|
||||
void setSummaryAddressYAndApplyInterpolation( const RifEclipseSummaryAddress& address );
|
||||
void setSummaryAddressY( const RifEclipseSummaryAddress& address );
|
||||
void setResampling( RiaDefines::DateTimePeriodEnum resampling );
|
||||
|
||||
|
@ -2553,7 +2553,7 @@ RimSummaryCurve* RimSummaryPlot::addNewCurve( const RifEclipseSummaryAddress& ad
|
||||
{
|
||||
auto* newCurve = new RimSummaryCurve();
|
||||
newCurve->setSummaryCaseY( summaryCase );
|
||||
newCurve->setSummaryAddressYAndApplyInterpolation( address );
|
||||
newCurve->setSummaryAddressY( address );
|
||||
|
||||
// This address is RifEclipseSummaryAddress::time() if the curve is a time plot. Otherwise it is the address of the summary vector used
|
||||
// for the x-axis
|
||||
|
Loading…
Reference in New Issue
Block a user