Decline curves: zoom all curves when changing forecast time.

This commit is contained in:
Kristian Bendiksen 2023-06-05 09:22:22 +02:00
parent b86644bd54
commit 4105e58ddb

View File

@ -24,6 +24,8 @@
#include "RigDeclineCurveCalculator.h"
#include "RimSummaryPlot.h"
#include "cafPdmUiDoubleSliderEditor.h"
#include "cafPdmUiLineEditor.h"
@ -295,6 +297,8 @@ void RimSummaryDeclineCurve::fieldChangedByUi( const caf::PdmFieldHandle* change
if ( changedField == &m_declineCurveType || changedField == &m_predictionYears || changedField == &m_hyperbolicDeclineConstant )
{
loadAndUpdateDataAndPlot();
auto plot = firstAncestorOrThisOfTypeAsserted<RimSummaryPlot>();
if ( plot ) plot->zoomAll();
}
}