From 7f038e98ab79f51c26fa49ca411a34314fb01a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Sun, 12 Nov 2017 12:38:12 +0100 Subject: [PATCH] #2130 Rewrite the wellLogFilesContainingPressure to fix observed data ways available bug --- .../Flow/RimWellPlotTools.cpp | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp index 3a2b25b03d..6d874315cc 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPlotTools.cpp @@ -253,7 +253,7 @@ void RimWellPlotTools::addTimeStepsToMap(std::map RimWellPlotTools::wellLogFilesContainingPressure(co } return wellLogFiles; } +#endif + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RimWellPlotTools::wellLogFilesContainingPressure(const QString& simWellName) +{ + std::vector wellLogFiles; + const RimProject* const project = RiaApplication::instance()->project(); + std::vector wellPaths = project->allWellPaths(); + + for (auto wellPath : wellPaths) + { + if (simWellName == wellPath->associatedSimulationWell()) + { + const std::vector files = wellPath->wellLogFiles(); + + for (RimWellLogFile* file : files) + { + if (hasPressureData(file)) + { + wellLogFiles.push_back(file); + } + } + } + } + + return wellLogFiles; +} //-------------------------------------------------------------------------------------------------- ///