#6081 Color Results : Update views when color legend content changes

This commit is contained in:
Magne Sjaastad
2020-06-17 13:26:11 +02:00
parent e11557c2be
commit c13f1d752d
16 changed files with 100 additions and 50 deletions

View File

@@ -2032,29 +2032,12 @@ void RimEclipseView::setCurrentCellResultData( const std::vector<double>& values
//--------------------------------------------------------------------------------------------------
void RimEclipseView::onResetLegendsInViewer()
{
RimRegularLegendConfig* cellResultNormalLegendConfig = this->cellResult()->legendConfig();
if ( cellResultNormalLegendConfig ) cellResultNormalLegendConfig->recreateLegend();
this->cellResult()->ternaryLegendConfig()->recreateLegend();
this->cellEdgeResult()->legendConfig()->recreateLegend();
for ( RimIntersectionResultDefinition* sepInterResDef :
this->separateIntersectionResultsCollection()->intersectionResultsDefinitions() )
for ( auto legendConfig : legendConfigs() )
{
sepInterResDef->regularLegendConfig()->recreateLegend();
sepInterResDef->ternaryLegendConfig()->recreateLegend();
}
for ( RimIntersectionResultDefinition* sepInterResDef :
this->separateSurfaceResultsCollection()->intersectionResultsDefinitions() )
{
sepInterResDef->regularLegendConfig()->recreateLegend();
sepInterResDef->ternaryLegendConfig()->recreateLegend();
}
for ( RimWellMeasurementInView* wellMeasurement : m_wellMeasurementCollection->measurements() )
{
wellMeasurement->legendConfig()->recreateLegend();
if ( legendConfig )
{
legendConfig->recreateLegend();
}
}
nativeOrOverrideViewer()->removeAllColorLegends();
@@ -2223,6 +2206,11 @@ std::vector<RimLegendConfig*> RimEclipseView::legendConfigs() const
absLegends.push_back( wellMeasurement->legendConfig() );
}
for ( auto legendConfig : m_surfaceCollection->legendConfigs() )
{
absLegends.push_back( legendConfig );
}
return absLegends;
}