mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4352 Hide Fracture CONDUCTIVTY legend if no visible fractures
This commit is contained in:
parent
efc7cca5c7
commit
521e170178
@ -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<RimFracture*> 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user