(#396) Create main plot collection and well log plot collection if needed

Reading old project files may give projects without main plot collection
and well plot collection. Those are now created in the command feature
for adding a new well log plot, if needed.
This commit is contained in:
Pål Hagen committed 2015-09-07 10:44:48 +02:00
1 parent 4618f50e9e
commit 27f8f34538
6 files changed
+81 -22

No files matched your search

@@ -36,10 +36,10 @@ RimMainPlotCollection::RimMainPlotCollection()
CAF_PDM_InitField(&show, "Show", true, "Show plots", "", "", "");
show.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&wellLogPlotCollection, "WellLogPlotCollection", "", "", "", "");
wellLogPlotCollection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_wellLogPlotCollection, "WellLogPlotCollection", "", "", "", "");
m_wellLogPlotCollection.uiCapability()->setUiHidden(true);
wellLogPlotCollection = new RimWellLogPlotCollection();
m_wellLogPlotCollection = new RimWellLogPlotCollection();
}
//--------------------------------------------------------------------------------------------------
@@ -47,7 +47,7 @@ RimMainPlotCollection::RimMainPlotCollection()
//--------------------------------------------------------------------------------------------------
RimMainPlotCollection::~RimMainPlotCollection()
{
if (wellLogPlotCollection()) delete wellLogPlotCollection();
if (m_wellLogPlotCollection()) delete m_wellLogPlotCollection();
}
//--------------------------------------------------------------------------------------------------
@@ -64,3 +64,22 @@ caf::PdmFieldHandle* RimMainPlotCollection::objectToggleField()
{
return &show;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimMainPlotCollection::recreateWellLogPlotCollection()
{
if (!wellLogPlotCollection())
{
m_wellLogPlotCollection = new RimWellLogPlotCollection();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogPlotCollection* RimMainPlotCollection::wellLogPlotCollection()
{
return m_wellLogPlotCollection();
}