#4493 Fracture : Hide Fractures in tree view if no fractures in model

This commit is contained in:
Magne Sjaastad
2019-06-21 07:07:37 +02:00
parent 7c054c47f2
commit 8997ec00e0
4 changed files with 20 additions and 17 deletions

View File

@@ -1645,13 +1645,18 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
uiTreeOrdering.add(faultResultSettings());
uiTreeOrdering.add(wellCollection());
RimProject* project = RiaApplication::instance()->project();
CVF_ASSERT(project);
RimOilField* oilfield = project->activeOilField();
if (oilfield && oilfield->fractureDefinitionCollection())
{
if (!oilfield->fractureDefinitionCollection()->fractureTemplates().empty())
bool showFractureColors = false;
std::vector<RimFracture*> fractures;
m_wellCollection->descendantsIncludingThisOfType(fractures);
wellPathCollection()->descendantsIncludingThisOfType(fractures);
if (!fractures.empty())
{
showFractureColors = true;
}
if (showFractureColors)
{
uiTreeOrdering.add(fractureColors());
}