#2584 3D well log curves: Create a collection object to hold curves

This commit is contained in:
Rebecca Cox
2018-03-07 15:12:27 +01:00
parent 00a0d2b1f6
commit 831eac7fd5
6 changed files with 119 additions and 16 deletions

View File

@@ -30,6 +30,7 @@
#include "RigWellPath.h"
#include "Rim3dWellLogCurve.h"
#include "Rim3dWellLogCurveCollection.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
@@ -129,7 +130,9 @@ RimWellPath::RimWellPath()
CAF_PDM_InitFieldNoDefault(&m_wellLogFiles, "WellLogFiles", "Well Log Files", "", "", "");
m_wellLogFiles.uiCapability()->setUiTreeHidden(true);
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "ArrayOf3dWellLogCurves", "3D Track", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "CollectionOf3dWellLogCurves", "3D Track", "", "", "");
m_3dWellLogCurves = new Rim3dWellLogCurveCollection;
m_3dWellLogCurves.uiCapability()->setUiTreeHidden(true);
CAF_PDM_InitField(&m_formationKeyInFile, "WellPathFormationKeyInFile", QString(""), "Key in File", "", "", "");
m_formationKeyInFile.uiCapability()->setUiReadOnly(true);
@@ -160,11 +163,6 @@ RimWellPath::~RimWellPath()
delete file;
}
for (const auto& rim3dWellLogCurve : m_3dWellLogCurves())
{
delete rim3dWellLogCurve;
}
RimProject* project;
firstAncestorOrThisOfType(project);
if (project)
@@ -519,7 +517,7 @@ void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, Q
uiTreeOrdering.add(&m_completions);
}
if (!m_3dWellLogCurves.empty())
if (m_3dWellLogCurves->has3dWellLogCurves())
{
uiTreeOrdering.add(&m_3dWellLogCurves);
}
@@ -808,7 +806,7 @@ const RigWellPathFormations* RimWellPath::formationsGeometry() const
//--------------------------------------------------------------------------------------------------
void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
{
m_3dWellLogCurves.push_back(rim3dWellLogCurve);
m_3dWellLogCurves->add3dWellLogCurve(rim3dWellLogCurve);
}
//--------------------------------------------------------------------------------------------------