#2378 Fractures: Hide "Fracture Colors" in Project tree when not in use

This commit is contained in:
Rebecca Cox
2018-01-18 11:42:29 +01:00
parent bbda7f30a2
commit 39cf8e8b0d
4 changed files with 55 additions and 6 deletions

View File

@@ -71,6 +71,7 @@
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimFracture.h"
#include "RimFractureTemplateCollection.h"
#include "RimSimWellFracture.h"
#include "RivWellFracturePartMgr.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
@@ -1469,7 +1470,18 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
uiTreeOrdering.add(cellEdgeResult());
uiTreeOrdering.add(faultResultSettings());
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
uiTreeOrdering.add(stimPlanColors());
RimProject* project = RiaApplication::instance()->project();
CVF_ASSERT(project);
RimOilField* oilfield = project->activeOilField();
if (oilfield && oilfield->fractureDefinitionCollection().notNull())
{
if (!oilfield->fractureDefinitionCollection()->fractureDefinitions.empty())
{
uiTreeOrdering.add(stimPlanColors());
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
uiTreeOrdering.add(wellCollection());