Make sure intersection calculations are done before legend update

The legend categories can be filtered to only visible categories. This requires the geometry generators to do intersection calculations, as the legend is created based on intersected cells.
This commit is contained in:
Magne Sjaastad
2024-09-23 14:03:35 +02:00
parent 3cb55cacb2
commit a0997821c6

View File

@@ -1632,6 +1632,12 @@ void RimEclipseView::updateLegendRangesTextAndVisibility( RimRegularLegendConfig
RimEclipseResultDefinition* eclResultDef,
int timeStepIndex )
{
// Call appendIntersectionsForCurrentTimeStep() is required to get the intersected cells. If the legend to update should list visible
// categories, the intersection geometry defines the intersected cells. These cells are then used to extract all category values, and
// find unique values. appendIntersectionsForCurrentTimeStep() is now called twice, and this could potentially be a performance issue
// for very large models.
appendIntersectionsForCurrentTimeStep();
eclResultDef->updateRangesForExplicitLegends( legendConfig, ternaryLegendConfig, timeStepIndex );
if ( eclResultDef->hasResult() && legendConfig->showLegend() )