#1976 RFT/PLT Plot. Prevent multiple well paths from associate to the same sim well

This commit is contained in:
Bjørn Erik Jensen
2017-10-25 09:55:55 +02:00
parent 85e2a5d3f3
commit b62d4448d9
4 changed files with 37 additions and 6 deletions
@@ -909,8 +909,8 @@ RimWellPath* RimProject::wellPathFromSimulationWell(const QString& simWellName,
auto wellPathColl = oilField->wellPathCollection();
for (const auto& path : wellPathColl->wellPaths)
{
if (QString::compare(path->relatedSimulationWell(), simWellName) == 0 &&
(branchIndex < 0 || path->relatedSimulationWellBranch() == branchIndex))
if (QString::compare(path->associatedSimulationWell(), simWellName) == 0 &&
(branchIndex < 0 || path->associatedSimulationWellBranch() == branchIndex))
{
return path;
}
@@ -919,6 +919,23 @@ RimWellPath* RimProject::wellPathFromSimulationWell(const QString& simWellName,
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellPath*> RimProject::allWellPaths() const
{
std::vector<RimWellPath*> paths;
for (const auto& oilField : oilFields())
{
auto wellPathColl = oilField->wellPathCollection();
for (const auto& path : wellPathColl->wellPaths)
{
paths.push_back(path);
}
}
return paths;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------