diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index 174f2f5f62..e4333aaaf1 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -1199,14 +1199,30 @@ void RimEclipseView::updateLegends() } } - RimRegularLegendConfig* stimPlanLegend = fractureColors()->activeLegend(); - if (stimPlanLegend && stimPlanLegend->showLegend()) { - fractureColors()->updateLegendData(); - - if (fractureColors()->isChecked() && stimPlanLegend->titledOverlayFrame()) + bool hasAnyVisibleFractures = false; { - m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->titledOverlayFrame()); + std::vector fractures; + RiaApplication::instance()->project()->activeOilField()->descendantsIncludingThisOfType(fractures); + + for (const auto& f : fractures) + { + if (f->isEnabled()) hasAnyVisibleFractures = true; + } + } + + if (hasAnyVisibleFractures) + { + RimRegularLegendConfig* stimPlanLegend = fractureColors()->activeLegend(); + if (stimPlanLegend && stimPlanLegend->showLegend()) + { + fractureColors()->updateLegendData(); + + if (fractureColors()->isChecked() && stimPlanLegend->titledOverlayFrame()) + { + m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->titledOverlayFrame()); + } + } } }