#2130 Rewrite the wellLogFilesContainingPressure to fix observed data ways available bug

This commit is contained in:
Jacob Støren 2017-11-12 12:38:12 +01:00
parent 324d6d72e3
commit 7f038e98ab

View File

@ -253,7 +253,7 @@ void RimWellPlotTools::addTimeStepsToMap(std::map<QDateTime, std::set<RifWellRft
}
}
}
#if 0
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -287,6 +287,35 @@ std::vector<RimWellLogFile*> RimWellPlotTools::wellLogFilesContainingPressure(co
}
return wellLogFiles;
}
#endif
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellLogFile*> RimWellPlotTools::wellLogFilesContainingPressure(const QString& simWellName)
{
std::vector<RimWellLogFile*> wellLogFiles;
const RimProject* const project = RiaApplication::instance()->project();
std::vector<RimWellPath*> wellPaths = project->allWellPaths();
for (auto wellPath : wellPaths)
{
if (simWellName == wellPath->associatedSimulationWell())
{
const std::vector<RimWellLogFile*> files = wellPath->wellLogFiles();
for (RimWellLogFile* file : files)
{
if (hasPressureData(file))
{
wellLogFiles.push_back(file);
}
}
}
}
return wellLogFiles;
}
//--------------------------------------------------------------------------------------------------
///