From cedd8c42d04cdcf384e1ca1e1747ef1f317e828d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Grip=20Fj=C3=A6r?= Date: Fri, 26 May 2017 13:01:28 +0200 Subject: [PATCH] #1524 Move "Fractures" into "Completions" folder --- .../ProjectDataModel/RimWellPath.cpp | 23 ++++++++----------- .../ProjectDataModel/RimWellPath.h | 5 +--- .../RimWellPathCompletions.cpp | 14 +++++++++++ .../ProjectDataModel/RimWellPathCompletions.h | 11 +++++---- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellPath.cpp b/ApplicationCode/ProjectDataModel/RimWellPath.cpp index 050ef81a5b..c141da71b5 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPath.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPath.cpp @@ -112,9 +112,6 @@ RimWellPath::RimWellPath() CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", ""); m_wellLogFile.uiCapability()->setUiHidden(true); - CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", ""); - fractureCollection = new RimWellPathFractureCollection(); - m_wellPath = NULL; } @@ -142,10 +139,6 @@ RimWellPath::~RimWellPath() } } } - - if (fractureCollection()) delete fractureCollection(); - - } @@ -189,6 +182,16 @@ RimPerforationCollection* RimWellPath::perforationIntervalCollection() return m_completions->perforationCollection(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellPathFractureCollection* RimWellPath::fractureCollection() +{ + CVF_ASSERT(m_completions); + + return m_completions->fractureCollection(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -318,12 +321,6 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q { uiTreeOrdering.add(&m_wellLogFile); uiTreeOrdering.add(&m_completions); - - // TODO : Move to subobject Completions->Fractures - for (RimWellPathFracture* fracture : fractureCollection()->fractures()) - { - uiTreeOrdering.add(fracture); - } uiTreeOrdering.skipRemainingChildren(true); } diff --git a/ApplicationCode/ProjectDataModel/RimWellPath.h b/ApplicationCode/ProjectDataModel/RimWellPath.h index 9f6f55474b..d8a62068f5 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPath.h +++ b/ApplicationCode/ProjectDataModel/RimWellPath.h @@ -79,14 +79,11 @@ public: RimFishbonesCollection* fishbonesCollection(); RimPerforationCollection* perforationIntervalCollection(); + RimWellPathFractureCollection* fractureCollection(); RigWellPath* wellPathGeometry(); const RigWellPath* wellPathGeometry() const; - caf::PdmChildField fractureCollection; - - - RivWellPathPartMgr* partMgr(); bool readWellPathFile(QString * errorMessage, RifWellPathImporter* wellPathImporter); diff --git a/ApplicationCode/ProjectDataModel/RimWellPathCompletions.cpp b/ApplicationCode/ProjectDataModel/RimWellPathCompletions.cpp index 0cf4c93386..a85a2c2952 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathCompletions.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPathCompletions.cpp @@ -20,6 +20,7 @@ #include "RimFishbonesCollection.h" #include "RimPerforationCollection.h" +#include "RimWellPathFractureCollection.h" #include "cvfAssert.h" @@ -40,6 +41,10 @@ RimWellPathCompletions::RimWellPathCompletions() CAF_PDM_InitFieldNoDefault(&m_fishbonesCollection, "Fishbones", "Fishbones", "", "", ""); m_fishbonesCollection = new RimFishbonesCollection; m_fishbonesCollection.uiCapability()->setUiHidden(true); + + CAF_PDM_InitFieldNoDefault(&m_fractureCollection, "Fractures", "Fractures", "", "", ""); + m_fractureCollection = new RimWellPathFractureCollection; + m_fractureCollection.uiCapability()->setUiHidden(true); } //-------------------------------------------------------------------------------------------------- @@ -62,3 +67,12 @@ RimPerforationCollection* RimWellPathCompletions::perforationCollection() const return m_perforationCollection; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() const +{ + CVF_ASSERT(m_fractureCollection); + + return m_fractureCollection; +} \ No newline at end of file diff --git a/ApplicationCode/ProjectDataModel/RimWellPathCompletions.h b/ApplicationCode/ProjectDataModel/RimWellPathCompletions.h index 3a26299cd7..65b5964663 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathCompletions.h +++ b/ApplicationCode/ProjectDataModel/RimWellPathCompletions.h @@ -23,6 +23,7 @@ class RimFishbonesCollection; class RimPerforationCollection; +class RimWellPathFractureCollection; //================================================================================================== /// @@ -35,10 +36,12 @@ class RimWellPathCompletions : public caf::PdmObject public: RimWellPathCompletions(); - RimFishbonesCollection* fishbonesCollection() const; - RimPerforationCollection* perforationCollection() const; + RimFishbonesCollection* fishbonesCollection() const; + RimPerforationCollection* perforationCollection() const; + RimWellPathFractureCollection* fractureCollection() const; private: - caf::PdmChildField m_fishbonesCollection; - caf::PdmChildField m_perforationCollection; + caf::PdmChildField m_fishbonesCollection; + caf::PdmChildField m_perforationCollection; + caf::PdmChildField m_fractureCollection; };