mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user