mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4493 Fracture : Hide Fractures in tree view if no fractures in model
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user