mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#672) Avoid deleting and hiding WellLogPlot and Wells folders when they have no children
This commit is contained in:
parent
9d9ff798a9
commit
704f4fa42b
@ -37,6 +37,7 @@ RimOilField::RimOilField(void)
|
|||||||
CAF_PDM_InitFieldNoDefault(&wellPathCollection, "WellPathCollection", "Well Paths", ":/WellCollection.png", "", "");
|
CAF_PDM_InitFieldNoDefault(&wellPathCollection, "WellPathCollection", "Well Paths", ":/WellCollection.png", "", "");
|
||||||
|
|
||||||
analysisModels = new RimEclipseCaseCollection();
|
analysisModels = new RimEclipseCaseCollection();
|
||||||
|
wellPathCollection = new RimWellPathCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -139,7 +139,11 @@ RimProject::~RimProject(void)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimProject::close()
|
void RimProject::close()
|
||||||
{
|
{
|
||||||
if (mainPlotCollection()) delete mainPlotCollection();
|
if (mainPlotCollection() && mainPlotCollection()->wellLogPlotCollection())
|
||||||
|
{
|
||||||
|
mainPlotCollection()->wellLogPlotCollection()->wellLogPlots.deleteAllChildObjects();
|
||||||
|
}
|
||||||
|
|
||||||
oilFields.deleteAllChildObjects();
|
oilFields.deleteAllChildObjects();
|
||||||
oilFields.push_back(new RimOilField);
|
oilFields.push_back(new RimOilField);
|
||||||
|
|
||||||
@ -723,10 +727,7 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
|||||||
{
|
{
|
||||||
if (mainPlotCollection->wellLogPlotCollection())
|
if (mainPlotCollection->wellLogPlotCollection())
|
||||||
{
|
{
|
||||||
if (mainPlotCollection->wellLogPlotCollection()->wellLogPlots().size() > 0)
|
uiTreeOrdering.add(mainPlotCollection->wellLogPlotCollection());
|
||||||
{
|
|
||||||
uiTreeOrdering.add(mainPlotCollection->wellLogPlotCollection());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user