diff --git a/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp index dd412385e9..42ae4fbc3c 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp @@ -461,6 +461,8 @@ void RimWellLogRftCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel } else if (changedField == &m_wellName) { + m_branchIndex = 0; + updateWellChannelNameAndTimeStep(); this->loadDataAndUpdate(true); } @@ -526,6 +528,8 @@ RigEclipseWellLogExtractor* RimWellLogRftCurve::extractor() std::vector wellPaths = RiaSimWellBranchTools::simulationWellBranches(simWellName, m_branchDetection); if (wellPaths.size() == 0) return nullptr; + m_branchIndex = RiaSimWellBranchTools::clampBranchIndex(simWellName, m_branchIndex, m_branchDetection); + auto wellPathBranch = wellPaths[m_branchIndex]; eclExtractor = wellLogCollection->findOrCreateSimWellExtractor(simWellName,