mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#668) Autmatically change itersection name when changing well or branch
This commit is contained in:
@@ -109,6 +109,15 @@ void RimCrossSection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
updateWellCenterline();
|
||||
m_branchIndex = -1;
|
||||
}
|
||||
|
||||
|
||||
if (changedField == &simulationWell
|
||||
|| changedField == &wellPath
|
||||
|| changedField == &m_branchIndex)
|
||||
{
|
||||
updateName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -394,3 +403,23 @@ void RimCrossSection::updateWellExtentDefaultValue()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::updateName()
|
||||
{
|
||||
if (type == CS_SIMULATION_WELL && simulationWell())
|
||||
{
|
||||
name = simulationWell()->name();
|
||||
if (m_branchIndex() != -1)
|
||||
{
|
||||
name = name() + " Branch " + QString::number(m_branchIndex() + 1);
|
||||
}
|
||||
}
|
||||
else if (type() == CS_WELL_PATH && wellPath())
|
||||
{
|
||||
name = wellPath()->name();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user