mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3864 Update and clamp valve positions to perforation interval when perforation interval changes.
This commit is contained in:
@@ -69,6 +69,25 @@ RimWellPathValve::~RimWellPathValve()
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathValve::perforationIntervalUpdated()
|
||||
{
|
||||
if (m_type() == RiaDefines::ICV)
|
||||
{
|
||||
const RimPerforationInterval* perfInterval = nullptr;
|
||||
this->firstAncestorOrThisOfType(perfInterval);
|
||||
double startMD = perfInterval->startMD();
|
||||
double endMD = perfInterval->endMD();
|
||||
m_measuredDepth = cvf::Math::clamp(m_measuredDepth(), startMD, endMD);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_multipleValveLocations->perforationIntervalUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -436,19 +455,22 @@ void RimWellPathValve::defineEditorAttribute(const caf::PdmFieldHandle* field, Q
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathValve::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||
{
|
||||
QString fullName = componentLabel() + QString(" %1").arg(m_measuredDepth());
|
||||
this->setName(fullName);
|
||||
|
||||
if ( m_type() == RiaDefines::ICD )
|
||||
{
|
||||
this->setUiIcon(QIcon(":/ICDValve16x16.png"));
|
||||
}
|
||||
else if ( m_type() == RiaDefines::ICV )
|
||||
if ( m_type() == RiaDefines::ICV )
|
||||
{
|
||||
this->setUiIcon(QIcon(":/ICVValve16x16.png"));
|
||||
QString fullName = QString("%1: %2").arg(componentLabel()).arg(m_measuredDepth());
|
||||
this->setName(fullName);
|
||||
}
|
||||
else if ( m_type() == RiaDefines::ICD )
|
||||
{
|
||||
this->setUiIcon(QIcon(":/ICDValve16x16.png"));
|
||||
QString fullName = QString("%1: %2 - %3").arg(componentLabel()).arg(m_multipleValveLocations->rangeStart()).arg(m_multipleValveLocations->rangeEnd());
|
||||
this->setName(fullName);
|
||||
}
|
||||
else if ( m_type() == RiaDefines::AICD )
|
||||
{
|
||||
this->setUiIcon(QIcon(":/AICDValve16x16.png"));
|
||||
QString fullName = QString("%1: %2 - %3").arg(componentLabel()).arg(m_multipleValveLocations->rangeStart()).arg(m_multipleValveLocations->rangeEnd());
|
||||
this->setName(fullName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user