#5125 Make each well measurement a checkable entity.

This commit is contained in:
Kristian Bendiksen
2019-11-29 13:49:43 +01:00
parent ad9c767a36
commit 6efceea597
8 changed files with 389 additions and 178 deletions

View File

@@ -76,6 +76,7 @@
#include "RimViewLinker.h"
#include "RimViewNameConfig.h"
#include "RimVirtualPerforationResults.h"
#include "RimWellMeasurementInView.h"
#include "RimWellMeasurementInViewCollection.h"
#include "RimWellPathCollection.h"
@@ -1308,10 +1309,15 @@ void RimEclipseView::onUpdateLegends()
isUsingOverrideViewer() );
}
if ( m_wellMeasurementCollection->isChecked() && m_wellMeasurementCollection->legendConfig()->showLegend() )
if ( m_wellMeasurementCollection->isChecked() )
{
m_wellMeasurementCollection->updateLegendRangesTextAndVisibility( nativeOrOverrideViewer(),
isUsingOverrideViewer() );
for ( RimWellMeasurementInView* wellMeasurement : m_wellMeasurementCollection->measurements() )
{
if ( wellMeasurement->legendConfig()->showLegend() )
{
wellMeasurement->updateLegendRangesTextAndVisibility( nativeOrOverrideViewer(), isUsingOverrideViewer() );
}
}
}
}
@@ -1859,7 +1865,10 @@ void RimEclipseView::onResetLegendsInViewer()
sepInterResDef->ternaryLegendConfig()->recreateLegend();
}
m_wellMeasurementCollection->legendConfig()->recreateLegend();
for ( RimWellMeasurementInView* wellMeasurement : m_wellMeasurementCollection->measurements() )
{
wellMeasurement->legendConfig()->recreateLegend();
}
nativeOrOverrideViewer()->removeAllColorLegends();
}
@@ -2019,7 +2028,10 @@ std::vector<RimLegendConfig*> RimEclipseView::legendConfigs() const
absLegends.push_back( sepInterResDef->ternaryLegendConfig() );
}
absLegends.push_back( m_wellMeasurementCollection->legendConfig() );
for ( RimWellMeasurementInView* wellMeasurement : m_wellMeasurementCollection->measurements() )
{
absLegends.push_back( wellMeasurement->legendConfig() );
}
return absLegends;
}