Regression Analysis: remove time selection annotation when curve is hidden

This commit is contained in:
Kristian Bendiksen 2023-06-16 15:03:04 +02:00
parent 452969118f
commit 6c99ceb7ea

View File

@ -569,7 +569,7 @@ void RimSummaryRegressionAnalysisCurve::updateTimeAnnotations()
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
if ( m_timeRangeAnnotation ) plot->removeTimeAnnotation( m_timeRangeAnnotation );
if ( m_showTimeSelectionInPlot )
if ( m_showTimeSelectionInPlot && isChecked() )
{
m_timeRangeAnnotation = plot->addTimeRangeAnnotation( m_minTimeStep, m_maxTimeStep );
m_timeRangeAnnotation->setColor( color() );