mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Hide the main plot collection level in the project tree
"Well Log Plots" will be visible on the top level if there are plots.
This commit is contained in:
@@ -48,6 +48,8 @@
|
|||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPathImport.h"
|
#include "RimWellPathImport.h"
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
|
#include "RimWellLogPlotCollection.h"
|
||||||
|
#include "RimWellLogPlot.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
@@ -863,7 +865,16 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
|||||||
|
|
||||||
uiTreeOrdering.add(scriptCollection());
|
uiTreeOrdering.add(scriptCollection());
|
||||||
|
|
||||||
if (mainPlotCollection) uiTreeOrdering.add(mainPlotCollection());
|
if (mainPlotCollection)
|
||||||
|
{
|
||||||
|
if (mainPlotCollection->wellLogPlotCollection())
|
||||||
|
{
|
||||||
|
if (mainPlotCollection->wellLogPlotCollection()->wellLogPlots().size() > 0)
|
||||||
|
{
|
||||||
|
uiTreeOrdering.add(mainPlotCollection->wellLogPlotCollection());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uiTreeOrdering.setForgetRemainingFields(true);
|
uiTreeOrdering.setForgetRemainingFields(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,14 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
|
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
#include "cafPdmUiTreeView.h"
|
#include "cafPdmUiTreeView.h"
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimWellLogPlotCollection, "WellLogPlotCollection");
|
CAF_PDM_SOURCE_INIT(RimWellLogPlotCollection, "WellLogPlotCollection");
|
||||||
@@ -67,9 +71,9 @@ caf::PdmFieldHandle* RimWellLogPlotCollection::objectToggleField()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogPlotCollection::addWellLogPlot()
|
void RimWellLogPlotCollection::addWellLogPlot()
|
||||||
{
|
{
|
||||||
RimWellLogPlot* view = new RimWellLogPlot();
|
RimWellLogPlot* plot = new RimWellLogPlot();
|
||||||
wellLogPlots.push_back(view);
|
wellLogPlots.push_back(plot);
|
||||||
|
|
||||||
RiuMainWindow::instance()->projectTreeView()->setExpanded(this, true);
|
RiuMainWindow::instance()->projectTreeView()->setExpanded(this, true);
|
||||||
updateConnectedEditors();
|
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ public:
|
|||||||
RimWellLogPlotCollection();
|
RimWellLogPlotCollection();
|
||||||
virtual ~RimWellLogPlotCollection();
|
virtual ~RimWellLogPlotCollection();
|
||||||
|
|
||||||
|
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||||
|
|
||||||
void addWellLogPlot();
|
void addWellLogPlot();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -49,5 +51,4 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> show;
|
caf::PdmField<bool> show;
|
||||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user