mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Regression curve: Make sure source curve for regression always is created
The regression curve is using the curve object as data source for regression. Make sure that the source curve is always created, and set uncheck based on curve visibility.
This commit is contained in:
parent
1b2cae64c7
commit
b6f2dbb915
@ -2117,8 +2117,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
RimSummaryCaseCollection* group = m_yValuesSummaryCaseCollection();
|
||||
RimSummaryAddress* addr = m_yValuesSummaryAddress();
|
||||
|
||||
if ( !isCurvesVisible() || m_disableStatisticCurves || !group ||
|
||||
addr->address().category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID )
|
||||
if ( m_disableStatisticCurves || !group || addr->address().category() == RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID )
|
||||
return;
|
||||
|
||||
// Calculate
|
||||
@ -2209,7 +2208,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
else
|
||||
summaryCase = m_ensembleStatCaseY.get();
|
||||
|
||||
for ( auto address : addresses )
|
||||
for ( const auto& address : addresses )
|
||||
{
|
||||
auto curve = new RimSummaryCurve();
|
||||
curve->setParentPlotNoReplot( plot->plotWidget() );
|
||||
@ -2217,6 +2216,8 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
||||
curve->setColor( m_statistics->color() );
|
||||
curve->setResampling( m_resampling() );
|
||||
|
||||
curve->setCheckState( isCurvesVisible() );
|
||||
|
||||
if ( m_statisticsUseCustomAppearance() == AppearanceMode::DEFAULT )
|
||||
{
|
||||
auto symbol = statisticsCurveSymbolFromAddress( address.summaryAddressY() );
|
||||
|
Loading…
Reference in New Issue
Block a user