#4857 Refactoring: Use legendConfigs method when removing legends on updateLegends

This commit is contained in:
Jacob Støren 2019-10-16 12:45:13 +02:00
parent 4f3e62a0d6
commit bba8fea197
2 changed files with 12 additions and 12 deletions

View File

@ -1169,16 +1169,12 @@ void RimEclipseView::updateLegends()
}
else
{
nativeOrOverrideViewer()->removeColorLegend( this->cellEdgeResult()->legendConfig()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend( fractureColors()->activeLegend()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend(
m_virtualPerforationResult->legendConfig()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend( this->cellResult()->legendConfig()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend( this->cellResult()->ternaryLegendConfig()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend(
this->currentFaultResultColors()->legendConfig()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend(
this->currentFaultResultColors()->ternaryLegendConfig()->titledOverlayFrame() );
std::vector<RimLegendConfig*> legendConfs = this->legendConfigs();
for (auto legendConf : legendConfs)
{
nativeOrOverrideViewer()->removeColorLegend(legendConf->titledOverlayFrame());
}
}
}

View File

@ -440,8 +440,12 @@ void RimGeoMechView::updateLegends()
}
else
{
nativeOrOverrideViewer()->removeColorLegend( cellResult()->legendConfig->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend( m_tensorResults->arrowColorLegendConfig->titledOverlayFrame() );
std::vector<RimLegendConfig*> legendConfs = this->legendConfigs();
for (auto legendConf : legendConfs)
{
nativeOrOverrideViewer()->removeColorLegend(legendConf->titledOverlayFrame());
}
}
this->updateLegendTextAndRanges( cellResult()->legendConfig(), m_currentTimeStep() );