#1038 - pre-proto - Added command feature for creating new well log collection fracture from context menu in project tree

This commit is contained in:
astridkbjorke 2016-12-20 09:53:19 +01:00
parent 456bc03483
commit ab6e12eb3a
14 changed files with 226 additions and 62 deletions

View File

@ -40,6 +40,7 @@ ${CEE_CURRENT_LIST_DIR}RicExportMultipleSnapshotsFeature.h
${CEE_CURRENT_LIST_DIR}RicNewSimWellFractureFeature.h ${CEE_CURRENT_LIST_DIR}RicNewSimWellFractureFeature.h
${CEE_CURRENT_LIST_DIR}RicNewFractureDefinitionFeature.h ${CEE_CURRENT_LIST_DIR}RicNewFractureDefinitionFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.h
# General delete of any object in a child array field # General delete of any object in a child array field
@ -83,6 +84,10 @@ ${CEE_CURRENT_LIST_DIR}RicExportMultipleSnapshotsFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewSimWellFractureFeature.cpp ${CEE_CURRENT_LIST_DIR}RicNewSimWellFractureFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewFractureDefinitionFeature.cpp ${CEE_CURRENT_LIST_DIR}RicNewFractureDefinitionFeature.cpp
#${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.cpp
# General delete of any object in a child array field # General delete of any object in a child array field

View File

@ -38,6 +38,9 @@
#include "RimEclipseInputProperty.h" #include "RimEclipseInputProperty.h"
#include "RimCellRangeFilter.h" #include "RimCellRangeFilter.h"
#include "RimEclipsePropertyFilter.h" #include "RimEclipsePropertyFilter.h"
#include "RimFracture.h"
#include "RimFractureCollection.h"
#include "RimFractureDefinition.h"
#include "RimGeoMechPropertyFilter.h" #include "RimGeoMechPropertyFilter.h"
#include "RimViewController.h" #include "RimViewController.h"
#include "RimWellLogCurve.h" #include "RimWellLogCurve.h"
@ -72,6 +75,9 @@ bool isDeletable(PdmUiItem * uiItem)
if (dynamic_cast<RimIntersectionBox*>(uiItem)) return true; if (dynamic_cast<RimIntersectionBox*>(uiItem)) return true;
if (dynamic_cast<RimFormationNames*>(uiItem)) return true; if (dynamic_cast<RimFormationNames*>(uiItem)) return true;
if (dynamic_cast<RimFormationNamesCollection*>(uiItem)) return true; if (dynamic_cast<RimFormationNamesCollection*>(uiItem)) return true;
if (dynamic_cast<RimFractureCollection*>(uiItem)) return true;
if (dynamic_cast<RimFracture*>(uiItem)) return true;
if (dynamic_cast<RimFractureDefinition*>(uiItem)) return true;
return false; return false;
} }

View File

@ -20,7 +20,7 @@
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RimOilField.h" #include "RimCase.h"
#include "RimFracture.h" #include "RimFracture.h"
#include "RimFractureCollection.h" #include "RimFractureCollection.h"
#include "RimProject.h" #include "RimProject.h"
@ -30,6 +30,7 @@
#include "cvfAssert.h" #include "cvfAssert.h"
#include "QAction.h" #include "QAction.h"
#include "RimEclipseWell.h"
CAF_CMD_SOURCE_INIT(RicNewSimWellFractureFeature, "RicNewSimWellFractureFeature"); CAF_CMD_SOURCE_INIT(RicNewSimWellFractureFeature, "RicNewSimWellFractureFeature");
@ -39,54 +40,26 @@ CAF_CMD_SOURCE_INIT(RicNewSimWellFractureFeature, "RicNewSimWellFractureFeature"
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked) void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
{ {
caf::PdmUiItem* pdmUiItem = caf::SelectionManager::instance()->selectedItem();
if (!pdmUiItem) return;
RimProject* project = RiaApplication::instance()->project(); caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(pdmUiItem);
CVF_ASSERT(project); if (!objHandle) return;
RimOilField* oilfield = project->activeOilField(); RimEclipseWell* eclipseWell = nullptr;
if (oilfield == nullptr) return; objHandle->firstAncestorOrThisOfType(eclipseWell);
RimFractureCollection* fracColl = oilfield->fractureCollection(); RimFractureCollection* fractureCollection = nullptr;
objHandle->firstAncestorOrThisOfType(fractureCollection);
CVF_ASSERT(fractureCollection);
if (fracColl)
{
RimFracture* fracture = new RimFracture(); RimFracture* fracture = new RimFracture();
fracColl->fractures.push_back(fracture); fractureCollection->fractures.push_back(fracture);
fracture->name = "New Fracture"; fracture->name = "New Simulation Well Fracture";
//TODO set all relevant defaults...
fractureCollection->updateConnectedEditors();
fracColl->updateConnectedEditors();
}
// RimSummaryPlot* plot = selectedSummaryPlot();
// if (plot)
// {
// RimSummaryCurve* newCurve = new RimSummaryCurve();
// plot->addCurve(newCurve);
//
// cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable();
// newCurve->setColor(curveColor);
//
// RimSummaryCase* defaultCase = nullptr;
// if (project->activeOilField()->summaryCaseCollection()->summaryCaseCount() > 0)
// {
// defaultCase = project->activeOilField()->summaryCaseCollection()->summaryCase(0);
// newCurve->setSummaryCase(defaultCase);
// newCurve->setVariable("FOPT");
// newCurve->loadDataAndUpdate();
// }
//
// plot->updateConnectedEditors();
//
// RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(newCurve);
// }
} }
@ -95,7 +68,7 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewSimWellFractureFeature::setupActionLook(QAction* actionToSetup) void RicNewSimWellFractureFeature::setupActionLook(QAction* actionToSetup)
{ {
// actionToSetup->setIcon(QIcon(":/CrossSection16x16.png")); actionToSetup->setIcon(QIcon(":/CrossSection16x16.png"));
actionToSetup->setText("New Fracture"); actionToSetup->setText("New Fracture");
} }
@ -103,6 +76,20 @@ void RicNewSimWellFractureFeature::setupActionLook(QAction* actionToSetup)
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicNewSimWellFractureFeature::isCommandEnabled() bool RicNewSimWellFractureFeature::isCommandEnabled()
{
caf::PdmUiItem* pdmUiItem = caf::SelectionManager::instance()->selectedItem();
if (!pdmUiItem) return false;
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(pdmUiItem);
if (!objHandle) return false;
RimEclipseWell* eclipseWell = nullptr;
objHandle->firstAncestorOrThisOfType(eclipseWell);
if (eclipseWell)
{ {
return true; return true;
} }
return false;
}

View File

@ -0,0 +1,100 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- Statoil ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicNewWellPathCollFractureFeature.h"
#include "RiaApplication.h"
#include "RimCase.h"
#include "RimFracture.h"
#include "RimFractureCollection.h"
#include "RimProject.h"
#include "cafSelectionManager.h"
#include "cvfAssert.h"
#include "QAction.h"
#include "RimEclipseWell.h"
#include "RimWellPathCollection.h"
CAF_CMD_SOURCE_INIT(RicNewWellPathCollFractureFeature, "RicNewWellPathCollFractureFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellPathCollFractureFeature::onActionTriggered(bool isChecked)
{
caf::PdmUiItem* pdmUiItem = caf::SelectionManager::instance()->selectedItem();
if (!pdmUiItem) return;
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(pdmUiItem);
if (!objHandle) return;
RimWellPathCollection* wellPathColl = nullptr;
objHandle->firstAncestorOrThisOfType(wellPathColl);
// RimEclipseWell* eclipseWell = nullptr;
// objHandle->firstAncestorOrThisOfType(eclipseWell);
RimFractureCollection* fractureCollection = nullptr;
objHandle->firstAncestorOrThisOfType(fractureCollection);
CVF_ASSERT(fractureCollection);
RimFracture* fracture = new RimFracture();
fractureCollection->fractures.push_back(fracture);
fracture->name = "New Well Path Fracture";
fracture->welltype = RimFracture::FRACTURE_WELL_PATH;
//TODO set all relevant defaults...
fractureCollection->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellPathCollFractureFeature::setupActionLook(QAction* actionToSetup)
{
// actionToSetup->setIcon(QIcon(":/CrossSection16x16.png"));
actionToSetup->setText("New Fracture");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewWellPathCollFractureFeature::isCommandEnabled()
{
caf::PdmUiItem* pdmUiItem = caf::SelectionManager::instance()->selectedItem();
if (!pdmUiItem) return false;
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(pdmUiItem);
if (!objHandle) return false;
RimWellPathCollection* wellPathColl = nullptr;
objHandle->firstAncestorOrThisOfType(wellPathColl);
if (wellPathColl)
{
return true;
}
return false;
}

View File

@ -0,0 +1,39 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2016- Statoil ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
#include <vector>
//==================================================================================================
///
//==================================================================================================
class RicNewWellPathCollFractureFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
virtual void onActionTriggered(bool isChecked) override;
virtual void setupActionLook(QAction* actionToSetup) override;
virtual bool isCommandEnabled() override;
};

View File

@ -75,6 +75,7 @@
#include <QMenu> #include <QMenu>
#include "RimFault.h" #include "RimFault.h"
#include "RimFracture.h"
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
@ -354,9 +355,11 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
{ {
commandIds << "RicExportFaultsFeature"; commandIds << "RicExportFaultsFeature";
} }
else if (dynamic_cast<RimFractureCollection*>(uiItem)) else if (dynamic_cast<RimFractureCollection*>(uiItem)
|| dynamic_cast<RimFracture*>(uiItem) )
{ {
commandIds << "RicNewSimWellFractureFeature"; commandIds << "RicNewSimWellFractureFeature";
commandIds << "RicNewWellPathCollFractureFeature";
} }
else if (dynamic_cast<RimFractureDefinitionCollection*>(uiItem)) else if (dynamic_cast<RimFractureDefinitionCollection*>(uiItem))
{ {

View File

@ -23,6 +23,7 @@
#include "RimIntersectionCollection.h" #include "RimIntersectionCollection.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimEclipseWellCollection.h" #include "RimEclipseWellCollection.h"
#include "RimFractureCollection.h"
#include "cvfMath.h" #include "cvfMath.h"
@ -48,13 +49,17 @@ RimEclipseWell::RimEclipseWell()
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", ""); CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", ""); CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
name.uiCapability()->setUiHidden(true); name.uiCapability()->setUiHidden(true);
name.uiCapability()->setUiReadOnly(true); name.uiCapability()->setUiReadOnly(true);
fractureCollection.uiCapability()->setUiHidden(true);
m_resultWellIndex = cvf::UNDEFINED_SIZE_T; m_resultWellIndex = cvf::UNDEFINED_SIZE_T;
m_reservoirView = NULL; m_reservoirView = NULL;
fractureCollection = new RimFractureCollection();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -62,6 +67,7 @@ RimEclipseWell::RimEclipseWell()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseWell::~RimEclipseWell() RimEclipseWell::~RimEclipseWell()
{ {
if (fractureCollection()) delete fractureCollection();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -31,8 +31,10 @@
// Include to make Pdm work for cvf::Color // Include to make Pdm work for cvf::Color
#include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfColor.h"
#include "cafPdmChildField.h"
class RimEclipseView; class RimEclipseView;
class RimFractureCollection;
//================================================================================================== //==================================================================================================
/// ///
@ -76,6 +78,9 @@ public:
caf::PdmField<cvf::Color3f> wellPipeColor; caf::PdmField<cvf::Color3f> wellPipeColor;
caf::PdmField<double> pipeRadiusScaleFactor; caf::PdmField<double> pipeRadiusScaleFactor;
caf::PdmChildField<RimFractureCollection*> fractureCollection;
private: private:
cvf::ref<RigSingleWellResultsData> m_wellResults; cvf::ref<RigSingleWellResultsData> m_wellResults;
size_t m_resultWellIndex; size_t m_resultWellIndex;

View File

@ -133,7 +133,7 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Fractures"); caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup("Fractures");
geometryGroup->add(&fractureDefinition); geometryGroup->add(&fractureDefinition);
geometryGroup->add(&welltype); // geometryGroup->add(&welltype);
if (welltype == FRACTURE_WELL_PATH) if (welltype == FRACTURE_WELL_PATH)
{ {

View File

@ -23,7 +23,7 @@
#include "RimEclipseCaseCollection.h" #include "RimEclipseCaseCollection.h"
#include "RimFormationNamesCollection.h" #include "RimFormationNamesCollection.h"
#include "RimFractureDefinitionCollection.h" #include "RimFractureDefinitionCollection.h"
#include "RimFractureCollection.h" //#include "RimFractureCollection.h"
#include "RimGeoMechModels.h" #include "RimGeoMechModels.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseCollection.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
@ -42,11 +42,11 @@ RimOilField::RimOilField(void)
CAF_PDM_InitFieldNoDefault(&wellPathCollection, "WellPathCollection", "Well Paths", ":/WellCollection.png", "", ""); CAF_PDM_InitFieldNoDefault(&wellPathCollection, "WellPathCollection", "Well Paths", ":/WellCollection.png", "", "");
CAF_PDM_InitFieldNoDefault(&fractureDefinitionCollection, "FractureDefinitionCollection", "Defenition of fractures", "", "", ""); CAF_PDM_InitFieldNoDefault(&fractureDefinitionCollection, "FractureDefinitionCollection", "Defenition of fractures", "", "", "");
CAF_PDM_InitFieldNoDefault(&summaryCaseCollection,"SummaryCaseCollection","Summary Cases",":/GridModels.png","",""); CAF_PDM_InitFieldNoDefault(&summaryCaseCollection,"SummaryCaseCollection","Summary Cases",":/GridModels.png","","");
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", ""); // CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
CAF_PDM_InitFieldNoDefault(&formationNamesCollection,"FormationNamesCollection","Formations","","",""); CAF_PDM_InitFieldNoDefault(&formationNamesCollection,"FormationNamesCollection","Formations","","","");
fractureDefinitionCollection = new RimFractureDefinitionCollection(); fractureDefinitionCollection = new RimFractureDefinitionCollection();
fractureCollection = new RimFractureCollection(); // fractureCollection = new RimFractureCollection();
analysisModels = new RimEclipseCaseCollection(); analysisModels = new RimEclipseCaseCollection();
wellPathCollection = new RimWellPathCollection(); wellPathCollection = new RimWellPathCollection();
summaryCaseCollection = new RimSummaryCaseCollection(); summaryCaseCollection = new RimSummaryCaseCollection();
@ -59,7 +59,7 @@ RimOilField::~RimOilField(void)
{ {
if (wellPathCollection()) delete wellPathCollection(); if (wellPathCollection()) delete wellPathCollection();
if (fractureDefinitionCollection()) delete fractureDefinitionCollection(); if (fractureDefinitionCollection()) delete fractureDefinitionCollection();
if (fractureCollection()) delete fractureCollection(); // if (fractureCollection()) delete fractureCollection();
if (geoMechModels()) delete geoMechModels(); if (geoMechModels()) delete geoMechModels();
if (analysisModels()) delete analysisModels(); if (analysisModels()) delete analysisModels();
if (summaryCaseCollection()) delete summaryCaseCollection(); if (summaryCaseCollection()) delete summaryCaseCollection();

View File

@ -29,7 +29,7 @@ class RimEclipseCaseCollection;
class RimGeoMechModels; class RimGeoMechModels;
class RimWellPathCollection; class RimWellPathCollection;
class RimFractureDefinitionCollection; class RimFractureDefinitionCollection;
class RimFractureCollection; //class RimFractureCollection;
class RimSummaryCaseCollection; class RimSummaryCaseCollection;
class RimFormationNamesCollection; class RimFormationNamesCollection;
@ -49,7 +49,7 @@ public:
caf::PdmChildField<RimGeoMechModels*> geoMechModels; caf::PdmChildField<RimGeoMechModels*> geoMechModels;
caf::PdmChildField<RimWellPathCollection*> wellPathCollection; caf::PdmChildField<RimWellPathCollection*> wellPathCollection;
caf::PdmChildField<RimFractureDefinitionCollection*> fractureDefinitionCollection; caf::PdmChildField<RimFractureDefinitionCollection*> fractureDefinitionCollection;
caf::PdmChildField<RimFractureCollection*> fractureCollection; // caf::PdmChildField<RimFractureCollection*> fractureCollection;
caf::PdmChildField<RimSummaryCaseCollection*> summaryCaseCollection; caf::PdmChildField<RimSummaryCaseCollection*> summaryCaseCollection;
caf::PdmChildField<RimFormationNamesCollection*> formationNamesCollection; caf::PdmChildField<RimFormationNamesCollection*> formationNamesCollection;

View File

@ -34,7 +34,7 @@
#include "RimEclipseCaseCollection.h" #include "RimEclipseCaseCollection.h"
#include "RimFormationNamesCollection.h" #include "RimFormationNamesCollection.h"
#include "RimFractureDefinitionCollection.h" #include "RimFractureDefinitionCollection.h"
#include "RimFractureCollection.h" //#include "RimFractureCollection.h"
#include "RimGeoMechCase.h" #include "RimGeoMechCase.h"
#include "RimGeoMechModels.h" #include "RimGeoMechModels.h"
#include "RimGridSummaryCase.h" #include "RimGridSummaryCase.h"
@ -828,7 +828,7 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
if (oilField->geoMechModels()) uiTreeOrdering.add(oilField->geoMechModels()); if (oilField->geoMechModels()) uiTreeOrdering.add(oilField->geoMechModels());
if (oilField->wellPathCollection()) uiTreeOrdering.add(oilField->wellPathCollection()); if (oilField->wellPathCollection()) uiTreeOrdering.add(oilField->wellPathCollection());
if (oilField->fractureDefinitionCollection()) uiTreeOrdering.add(oilField->fractureDefinitionCollection()); if (oilField->fractureDefinitionCollection()) uiTreeOrdering.add(oilField->fractureDefinitionCollection());
if (oilField->fractureCollection()) uiTreeOrdering.add(oilField->fractureCollection()); // if (oilField->fractureCollection()) uiTreeOrdering.add(oilField->fractureCollection());
if (oilField->formationNamesCollection()) uiTreeOrdering.add(oilField->formationNamesCollection()); if (oilField->formationNamesCollection()) uiTreeOrdering.add(oilField->formationNamesCollection());
} }

View File

@ -22,6 +22,8 @@
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RiaPreferences.h" #include "RiaPreferences.h"
#include "RimFractureCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimWellLogFile.h" #include "RimWellLogFile.h"
@ -79,11 +81,17 @@ RimWellPathCollection::RimWellPathCollection()
CAF_PDM_InitField(&wellPathClipZDistance, "WellPathClipZDistance", 100, "Well path clipping depth distance", "", "", ""); CAF_PDM_InitField(&wellPathClipZDistance, "WellPathClipZDistance", 100, "Well path clipping depth distance", "", "", "");
CAF_PDM_InitFieldNoDefault(&wellPaths, "WellPaths", "Well Paths", "", "", ""); CAF_PDM_InitFieldNoDefault(&wellPaths, "WellPaths", "Well Paths", "", "", "");
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
wellPaths.uiCapability()->setUiHidden(true); wellPaths.uiCapability()->setUiHidden(true);
fractureCollection.uiCapability()->setUiHidden(true);
m_wellPathCollectionPartManager = new RivWellPathCollectionPartMgr(this); m_wellPathCollectionPartManager = new RivWellPathCollectionPartMgr(this);
m_asciiFileReader = new RifWellPathAsciiFileReader; m_asciiFileReader = new RifWellPathAsciiFileReader;
fractureCollection = new RimFractureCollection();
} }
@ -93,6 +101,7 @@ RimWellPathCollection::RimWellPathCollection()
RimWellPathCollection::~RimWellPathCollection() RimWellPathCollection::~RimWellPathCollection()
{ {
wellPaths.deleteAllChildObjects(); wellPaths.deleteAllChildObjects();
if (fractureCollection()) delete fractureCollection();
delete m_asciiFileReader; delete m_asciiFileReader;
} }

View File

@ -28,11 +28,13 @@
// Include to make Pdm work for cvf::Color // Include to make Pdm work for cvf::Color
#include "cafPdmFieldCvfColor.h" #include "cafPdmFieldCvfColor.h"
#include "cafPdmChildField.h"
#include "cvfObject.h" #include "cvfObject.h"
#include <QString> #include <QString>
class RimFractureCollection;
class RivWellPathCollectionPartMgr; class RivWellPathCollectionPartMgr;
class RifWellPathAsciiFileReader; class RifWellPathAsciiFileReader;
class RimWellPath; class RimWellPath;
@ -74,6 +76,8 @@ public:
caf::PdmField<int> wellPathClipZDistance; caf::PdmField<int> wellPathClipZDistance;
caf::PdmChildArrayField<RimWellPath*> wellPaths; caf::PdmChildArrayField<RimWellPath*> wellPaths;
caf::PdmChildField<RimFractureCollection*> fractureCollection;
RivWellPathCollectionPartMgr* wellPathCollectionPartMgr() { return m_wellPathCollectionPartManager.p(); } RivWellPathCollectionPartMgr* wellPathCollectionPartMgr() { return m_wellPathCollectionPartManager.p(); }