#9522 Contour Map: Ensure correct update of grid calculator maps

This commit is contained in:
Magne Sjaastad
2022-12-14 11:29:14 +01:00
parent 500b4d2922
commit 16239cd80c
4 changed files with 25 additions and 11 deletions

View File

@@ -27,6 +27,8 @@
#include "Rim2dIntersectionView.h"
#include "Rim2dIntersectionViewCollection.h"
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseContourMapProjection.h"
#include "RimEclipseContourMapView.h"
#include "RimEclipseContourMapViewCollection.h"
#include "RimEclipseView.h"
@@ -134,6 +136,16 @@ void RimReloadCaseTools::updateAll3dViews( RimEclipseCase* eclipseCase )
for ( RimEclipseContourMapView* contourMap : eclipseCase->contourMapCollection()->views() )
{
CVF_ASSERT( contourMap );
if ( contourMap->cellResult()->resultType() == RiaDefines::ResultCatType::GENERATED )
{
// When a generated result is selected, the data might come from a calculation. Make sure that all
// computations are updated based on new data.
// See RimEclipseContourMapProjection::generateResults()
contourMap->contourMapProjection()->clearGeometry();
contourMap->contourMapProjection()->clearGridMappingAndRedraw();
}
contourMap->loadDataAndUpdate();
contourMap->updateGridBoxData();
contourMap->updateAnnotationItems();