Clamp time step when changing case for well log extraction curve

This commit is contained in:
Magne Sjaastad
2015-12-10 22:31:41 +01:00
parent 179f0c906b
commit 061de66597
2 changed files with 16 additions and 0 deletions

View File

@@ -140,6 +140,19 @@ void RimWellLogExtractionCurve::setPropertiesFromView(RimView* view)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogExtractionCurve::clampTimestep()
{
if (m_case)
{
if (m_timeStep > m_case->timeStepStrings().size() - 1)
{
m_timeStep = m_case->timeStepStrings().size() - 1;
}
}
}
//--------------------------------------------------------------------------------------------------
///
@@ -150,6 +163,8 @@ void RimWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* chan
if (changedField == &m_case)
{
clampTimestep();
this->updatePlotData();
}
else if (changedField == &m_wellPath)