#2123 Formation/Well Path: Add func to find well paths with formations

This commit is contained in:
Rebecca Cox
2017-11-27 14:36:19 +01:00
parent bdc680bc03
commit a724049487
4 changed files with 48 additions and 0 deletions

View File

@@ -240,6 +240,30 @@ void RimTools::wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTools::wellPathWithFormationsOptionItems(QList<caf::PdmOptionItemInfo>* options)
{
CVF_ASSERT(options);
if (!options) return;
RimProject* proj = RiaApplication::instance()->project();
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
{
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
QIcon wellIcon(":/Well.png");
for (RimWellPath* wellPath : wellPaths)
{
if (wellPath->hasFormations())
{
options->push_back(caf::PdmOptionItemInfo(wellPath->name(), wellPath, false, wellIcon));
}
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------