From cc591aa28712217dbc9a7997a0289c39943b1073 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 17 Jun 2020 13:57:12 +0200 Subject: [PATCH] #6081 Color Results : Show legends in geomech view --- ApplicationCode/ProjectDataModel/RimEclipseView.cpp | 7 +++++-- ApplicationCode/ProjectDataModel/RimGeoMechView.cpp | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index c503ea1cb4..d5a46c8c5b 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -2206,9 +2206,12 @@ std::vector RimEclipseView::legendConfigs() const absLegends.push_back( wellMeasurement->legendConfig() ); } - for ( auto legendConfig : m_surfaceCollection->legendConfigs() ) + if ( m_surfaceCollection ) { - absLegends.push_back( legendConfig ); + for ( auto legendConfig : m_surfaceCollection->legendConfigs() ) + { + absLegends.push_back( legendConfig ); + } } return absLegends; diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 63f0798bf3..35697f71e7 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -525,6 +525,11 @@ void RimGeoMechView::onUpdateLegends() } } } + + if ( m_surfaceCollection && m_surfaceCollection->isChecked() ) + { + m_surfaceCollection->updateLegendRangesTextAndVisibility( nativeOrOverrideViewer(), isUsingOverrideViewer() ); + } } } @@ -634,6 +639,14 @@ std::vector RimGeoMechView::legendConfigs() const absLegendConfigs.push_back( wellMeasurement->legendConfig() ); } + if ( m_surfaceCollection ) + { + for ( auto legendConfig : m_surfaceCollection->legendConfigs() ) + { + absLegendConfigs.push_back( legendConfig ); + } + } + return absLegendConfigs; }