mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 15:26:48 -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", "", "");
|
||||
|
||||
analysisModels = new RimEclipseCaseCollection();
|
||||
wellPathCollection = new RimWellPathCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -139,7 +139,11 @@ RimProject::~RimProject(void)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::close()
|
||||
{
|
||||
if (mainPlotCollection()) delete mainPlotCollection();
|
||||
if (mainPlotCollection() && mainPlotCollection()->wellLogPlotCollection())
|
||||
{
|
||||
mainPlotCollection()->wellLogPlotCollection()->wellLogPlots.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
oilFields.deleteAllChildObjects();
|
||||
oilFields.push_back(new RimOilField);
|
||||
|
||||
@ -722,13 +726,10 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
||||
if (mainPlotCollection)
|
||||
{
|
||||
if (mainPlotCollection->wellLogPlotCollection())
|
||||
{
|
||||
if (mainPlotCollection->wellLogPlotCollection()->wellLogPlots().size() > 0)
|
||||
{
|
||||
uiTreeOrdering.add(mainPlotCollection->wellLogPlotCollection());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uiTreeOrdering.add(scriptCollection());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user