diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp index e8283ef52a..205c189276 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp @@ -167,7 +167,7 @@ bool RimWellPlotTools::hasFlowData(RimWellPath* wellPath) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimWellPlotTools::isWellPath(const QString& wellName) +bool RimWellPlotTools::hasAssociatedWellPath(const QString& wellName) { RimProject* proj = RiaApplication::instance()->project(); RimWellPath* wellPath = proj->wellPathByName(wellName); diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.h b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.h index 0b7a69fd35..8da7cd921b 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.h +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.h @@ -79,7 +79,7 @@ public: // others static bool hasFlowData(const RimWellLogFile* wellLogFile); - static bool isWellPath(const QString& wellName); + static bool hasAssociatedWellPath(const QString& wellName); // Both static std::vector gridCasesForWell(const QString& simWellName); diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp index 64ee6b5ddc..3e3efa0ec6 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp @@ -104,24 +104,6 @@ RimWellRftPlot::RimWellRftPlot() m_isOnLoad = true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RimWellLogTrack::TrajectoryType trajectoryTypeFromWellName(const QString& wellPathOrSimWellName) -{ - RimWellLogTrack::TrajectoryType trajectoryType = RimWellLogTrack::SIMULATION_WELL; - - RimProject* proj = RiaApplication::instance()->project(); - RimWellPath* wellPath = proj->wellPathByName(wellPathOrSimWellName); - - if (wellPath) - { - trajectoryType = RimWellLogTrack::WELL_PATH; - } - - return trajectoryType; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -255,8 +237,6 @@ void RimWellRftPlot::updateFormationsOnPlot() const { if (m_wellLogPlot->trackCount() > 0) { - RimWellLogTrack::TrajectoryType trajectoryType = trajectoryTypeFromWellName(m_wellPathNameOrSimWellName); - RimProject* proj = RiaApplication::instance()->project(); RimWellPath* wellPath = proj->wellPathByName(m_wellPathNameOrSimWellName); @@ -273,15 +253,14 @@ void RimWellRftPlot::updateFormationsOnPlot() const formationNamesCase = cases[0]; } } - - if (trajectoryType == RimWellLogTrack::SIMULATION_WELL) - { - m_wellLogPlot->trackByIndex(0)->setAndUpdateSimWellFormationNamesAndBranchData(formationNamesCase, associatedSimWellName(), m_branchIndex, m_branchDetection); - } - else if (trajectoryType == RimWellLogTrack::WELL_PATH) + else if (wellPath) { m_wellLogPlot->trackByIndex(0)->setAndUpdateWellPathFormationNamesData(formationNamesCase, wellPath); } + else + { + m_wellLogPlot->trackByIndex(0)->setAndUpdateSimWellFormationNamesAndBranchData(formationNamesCase, associatedSimWellName(), m_branchIndex, m_branchDetection); + } } } @@ -780,7 +759,7 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering.add(&m_userName); uiOrdering.add(&m_wellPathNameOrSimWellName); - if (trajectoryTypeFromWellName(m_wellPathNameOrSimWellName) == RimWellLogTrack::SIMULATION_WELL) + if (!RimWellPlotTools::hasAssociatedWellPath(m_wellPathNameOrSimWellName)) { uiOrdering.add(&m_branchDetection); diff --git a/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp index 83593cf7e0..98823fa164 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp @@ -353,7 +353,7 @@ void RimWellLogRftCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data"); curveDataGroup->add(&m_eclipseResultCase); curveDataGroup->add(&m_wellName); - if (!RimWellPlotTools::isWellPath(m_wellName)) + if (!RimWellPlotTools::hasAssociatedWellPath(m_wellName)) { curveDataGroup->add(&m_branchDetection);