mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1722 Completion Export : Use RimTools::wellPathCollection
This commit is contained in:
@@ -227,10 +227,10 @@ void RimTools::wellPathOptionItems(QList<caf::PdmOptionItemInfo>* options)
|
||||
CVF_ASSERT(options);
|
||||
if (!options) return;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
|
||||
auto wellPathColl = RimTools::wellPathCollection();
|
||||
if (wellPathColl)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
caf::PdmChildArrayField<RimWellPath*>& wellPaths = wellPathColl->wellPaths;
|
||||
|
||||
QIcon wellIcon(":/Well.png");
|
||||
for (RimWellPath* wellPath : wellPaths)
|
||||
@@ -263,10 +263,10 @@ void RimTools::wellPathWithFormationsOptionItems(QList<caf::PdmOptionItemInfo>*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimTools::wellPathWithFormations(std::vector<RimWellPath*>* wellPaths)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection())
|
||||
auto wellPathColl = RimTools::wellPathCollection();
|
||||
if (wellPathColl)
|
||||
{
|
||||
caf::PdmChildArrayField<RimWellPath*>& allWellPaths = proj->activeOilField()->wellPathCollection()->wellPaths;
|
||||
caf::PdmChildArrayField<RimWellPath*>& allWellPaths = wellPathColl->wellPaths;
|
||||
|
||||
for (RimWellPath* wellPath : allWellPaths)
|
||||
{
|
||||
@@ -352,3 +352,17 @@ QString RimTools::dateFormatString()
|
||||
{
|
||||
return "dd.MMM yyyy";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCollection* RimTools::wellPathCollection()
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField())
|
||||
{
|
||||
return proj->activeOilField()->wellPathCollection();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user