#5641 Avoid unnecessary regeneration of contour map

* Move clearGeometry to a scheduleGeometryRegen override
This commit is contained in:
Gaute Lindkvist 2020-12-04 11:38:50 +01:00
parent 931c66ff2e
commit a7dd6f893d
2 changed files with 13 additions and 1 deletions

View File

@ -229,7 +229,6 @@ void RimEclipseContourMapView::onUpdateDisplayModelForCurrentTimeStep()
{
static_cast<RimEclipsePropertyFilterCollection*>( nativePropertyFilterCollection() )->updateFromCurrentTimeStep();
m_contourMapProjection->clearGeometry();
updateGeometry();
}
@ -522,3 +521,15 @@ bool RimEclipseContourMapView::zoomChangeAboveTreshold( const cvf::Vec3d& curren
const double threshold = 0.05 * distance;
return std::fabs( m_cameraPositionLastUpdate.z() - currentCameraPosition.z() ) > threshold;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseContourMapView::scheduleGeometryRegen( RivCellSetEnum geometryType )
{
RimEclipseView::scheduleGeometryRegen( geometryType );
if ( geometryType != VISIBLE_WELL_CELLS )
{
m_contourMapProjection->clearGeometry();
}
}

View File

@ -65,6 +65,7 @@ protected:
void onViewNavigationChanged() override;
bool zoomChangeAboveTreshold( const cvf::Vec3d& currentCameraPosition ) const;
void scheduleGeometryRegen( RivCellSetEnum geometryType ) override;
private:
cvf::ref<RivContourMapProjectionPartMgr> m_contourMapProjectionPartMgr;