Skip to content

Commit

Permalink
Regression curve: Make sure source curve for regression always is cre…
Browse files Browse the repository at this point in the history
…ated

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.
  • Loading branch information
magnesj committed Oct 20, 2023
1 parent 3f88a8b commit 080e6c0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2209,14 +2208,16 @@ 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() );
m_curves.push_back( curve );
curve->setColor( m_statistics->color() );
curve->setResampling( m_resampling() );

curve->setCheckState( isCurvesVisible() );

if ( m_statisticsUseCustomAppearance() == AppearanceMode::DEFAULT )
{
auto symbol = statisticsCurveSymbolFromAddress( address.summaryAddressY() );
Expand Down

0 comments on commit 080e6c0

Please sign in to comment.