#8623 Contour Map: exclude surfaces from appearing

Fixes #8623.
This commit is contained in:
Kristian Bendiksen 2022-03-23 10:59:18 +01:00
parent c87d68899e
commit d4d79d3dec
4 changed files with 19 additions and 6 deletions

View File

@ -560,3 +560,12 @@ void RimEclipseContourMapView::onLegendConfigChanged( const caf::SignalEmitter*
m_contourMapProjection->clearGeometry(); m_contourMapProjection->clearGeometry();
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceInViewCollection* RimEclipseContourMapView::surfaceInViewCollection() const
{
// Surfaces should not be shown in contour map.
return nullptr;
}

View File

@ -40,6 +40,8 @@ public:
void setDefaultCustomName(); void setDefaultCustomName();
void updatePickPointAndRedraw(); void updatePickPointAndRedraw();
RimSurfaceInViewCollection* surfaceInViewCollection() const override;
protected: protected:
void initAfterRead() override; void initAfterRead() override;
void onCreateDisplayModel() override; void onCreateDisplayModel() override;

View File

@ -597,9 +597,10 @@ void RimEclipseView::onCreateDisplayModel()
// Surfaces // Surfaces
m_surfaceVizModel->removeAllParts(); m_surfaceVizModel->removeAllParts();
if ( m_surfaceCollection ) if ( surfaceInViewCollection() )
{ {
m_surfaceCollection->appendPartsToModel( m_surfaceVizModel.p(), m_reservoirGridPartManager->scaleTransform() ); surfaceInViewCollection()->appendPartsToModel( m_surfaceVizModel.p(),
m_reservoirGridPartManager->scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_surfaceVizModel.p(), isUsingOverrideViewer() ); nativeOrOverrideViewer()->addStaticModelOnce( m_surfaceVizModel.p(), isUsingOverrideViewer() );
} }
@ -912,7 +913,8 @@ void RimEclipseView::updateVisibleCellColors()
bool hasGeneralCellResult = this->cellResult()->hasResult() || this->cellResult()->isTernarySaturationSelected(); bool hasGeneralCellResult = this->cellResult()->hasResult() || this->cellResult()->isTernarySaturationSelected();
m_intersectionCollection->updateCellResultColor( hasGeneralCellResult, m_currentTimeStep ); m_intersectionCollection->updateCellResultColor( hasGeneralCellResult, m_currentTimeStep );
if ( m_surfaceCollection ) m_surfaceCollection->updateCellResultColor( hasGeneralCellResult, m_currentTimeStep ); if ( surfaceInViewCollection() )
surfaceInViewCollection()->updateCellResultColor( hasGeneralCellResult, m_currentTimeStep );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -2291,9 +2293,9 @@ std::vector<RimLegendConfig*> RimEclipseView::legendConfigs() const
absLegends.push_back( wellMeasurement->legendConfig() ); absLegends.push_back( wellMeasurement->legendConfig() );
} }
if ( m_surfaceCollection ) if ( surfaceInViewCollection() )
{ {
for ( auto legendConfig : m_surfaceCollection->legendConfigs() ) for ( auto legendConfig : surfaceInViewCollection()->legendConfigs() )
{ {
absLegends.push_back( legendConfig ); absLegends.push_back( legendConfig );
} }

View File

@ -48,7 +48,7 @@ public:
cvf::ref<cvf::UByteArray> currentTotalCellVisibility(); cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
RimIntersectionCollection* intersectionCollection() const; RimIntersectionCollection* intersectionCollection() const;
RimSurfaceInViewCollection* surfaceInViewCollection() const; virtual RimSurfaceInViewCollection* surfaceInViewCollection() const;
RimIntersectionResultsDefinitionCollection* separateIntersectionResultsCollection() const; RimIntersectionResultsDefinitionCollection* separateIntersectionResultsCollection() const;
RimIntersectionResultsDefinitionCollection* separateSurfaceResultsCollection() const; RimIntersectionResultsDefinitionCollection* separateSurfaceResultsCollection() const;
RimAnnotationInViewCollection* annotationCollection() const; RimAnnotationInViewCollection* annotationCollection() const;