#2099 #2101 (partly) PLT plot. Well path/well name matching issues. Display only wells with well path

This commit is contained in:
Bjørn Erik Jensen
2017-11-08 16:37:19 +01:00
parent 1321b0d754
commit 95a5085ba0
5 changed files with 129 additions and 95 deletions
@@ -906,21 +906,29 @@ std::vector<const RigWellPath*> RimProject::simulationWellBranches(const QString
RimWellPath* RimProject::wellPathFromSimulationWell(const QString& simWellName, int branchIndex)
{
std::vector<RimWellPath*> paths;
for (const auto& oilField : oilFields())
for (RimWellPath* const path : allWellPaths())
{
auto wellPathColl = oilField->wellPathCollection();
for (const auto& path : wellPathColl->wellPaths)
if (QString::compare(path->associatedSimulationWell(), simWellName) == 0 &&
(branchIndex < 0 || path->associatedSimulationWellBranch() == branchIndex))
{
if (QString::compare(path->associatedSimulationWell(), simWellName) == 0 &&
(branchIndex < 0 || path->associatedSimulationWellBranch() == branchIndex))
{
return path;
}
return path;
}
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPath* RimProject::wellPathByName(const QString& wellPathName) const
{
for (RimWellPath* const path : allWellPaths())
{
if (path->name() == wellPathName) return path;
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------