From d48113dcdb69cbf0a27c196db65c2aec57858c8e Mon Sep 17 00:00:00 2001 From: Rebecca Cox Date: Tue, 28 Nov 2017 11:32:54 +0100 Subject: [PATCH] #2123 Formation/Well Path: Make well formations only valid for MD plot --- .../ProjectDataModel/RimWellLogTrack.cpp | 20 ++++++------------- .../ProjectDataModel/RimWellLogTrack.h | 2 -- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index 33b0d6d8b9..b14e6ccf6e 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -1156,14 +1156,6 @@ void RimWellLogTrack::setFormationFieldsUiReadOnly(bool readOnly /*= true*/) m_formationBranchIndex.uiCapability()->setUiReadOnly(readOnly); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimWellLogTrack::updateFormationNamesFromCase() -{ - -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -1181,6 +1173,9 @@ void RimWellLogTrack::updateFormationNamesOnPlot() std::vector formationNamesToPlot; std::vector> yValues; + RimWellLogPlot* plot = nullptr; + firstAncestorOrThisOfTypeAsserted(plot); + if (m_formationSource == CASE) { if ((m_formationSimWellName == QString("None") && m_formationWellPath == nullptr) || m_formationCase == nullptr) return; @@ -1190,11 +1185,10 @@ void RimWellLogTrack::updateFormationNamesOnPlot() RimWellLogPlotCollection* wellLogCollection = mainPlotCollection->wellLogPlotCollection(); - CurveSamplingPointData curveData; - RigEclipseWellLogExtractor* eclWellLogExtractor; - RigGeoMechWellLogExtractor* geoMechWellLogExtractor; + RigEclipseWellLogExtractor* eclWellLogExtractor = nullptr; + RigGeoMechWellLogExtractor* geoMechWellLogExtractor = nullptr; if (m_formationTrajectoryType == SIMULATION_WELL) { @@ -1232,9 +1226,6 @@ void RimWellLogTrack::updateFormationNamesOnPlot() RigFemResultAddress(RIG_FORMATION_NAMES, activeFormationNamesResultName, "")); } - RimWellLogPlot* plot; - firstAncestorOrThisOfTypeAsserted(plot); - std::vector formationNamesVector = RimWellLogTrack::formationNamesVector(m_formationCase); RimWellLogTrack::findFormationNamesToPlot(curveData, @@ -1246,6 +1237,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot() else { if (m_formationWellPath == nullptr) return; + if (plot->depthType() != RimWellLogPlot::MEASURED_DEPTH) return; std::vector topYValues; diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h index 83a3d48170..acf69dbf4b 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h @@ -148,8 +148,6 @@ private: void setFormationFieldsUiReadOnly(bool readOnly = true); - void updateFormationNamesFromCase(); - void updateFormationNamesFromWellPath(); void updateFormationNamesOnPlot(); void removeFormationNames(); void updateAxisScaleEngine();