mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-28 16:10:24 -05:00
2025.04.0 Merge dev into main
This commit is contained in:
1 parent
e9ec8cb718
commit
f96374a6b4
969 files changed
+40872
-31569
No files matched your search
@@ -42,10 +42,12 @@
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "cafCategoryMapper.h"
|
||||
|
||||
#include "cvfColor3.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "cafCategoryMapper.h"
|
||||
#include "cvfColor3.h"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -491,7 +493,8 @@ void RimEclipseResultDefinitionTools::updateLegendForFlowDiagnostics( const RimE
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultDefinitionTools::updateCellResultLegend( const RimEclipseResultDefinition* resultDefinition,
|
||||
RimRegularLegendConfig* legendConfigToUpdate,
|
||||
int timeStep )
|
||||
int timeStep,
|
||||
RimEclipseView* sourceCellVisibilityView )
|
||||
{
|
||||
if ( !resultDefinition || !legendConfigToUpdate ) return;
|
||||
|
||||
@@ -638,19 +641,17 @@ void RimEclipseResultDefinitionTools::updateCellResultLegend( const RimEclipseRe
|
||||
|
||||
if ( resultDefinition->showOnlyVisibleCategoriesInLegend() )
|
||||
{
|
||||
auto eclView = resultDefinition->firstAncestorOrThisOfType<RimEclipseView>();
|
||||
if ( eclView && eclView->showWindow() )
|
||||
// If a predefined view is nullptr, search for an ancestor view
|
||||
auto cellVisibilityView = sourceCellVisibilityView ? sourceCellVisibilityView
|
||||
: resultDefinition->firstAncestorOrThisOfType<RimEclipseView>();
|
||||
if ( cellVisibilityView && cellVisibilityView->showWindow() )
|
||||
{
|
||||
// Check if current result is cell result, and update the visible set of values
|
||||
// TODO: Can be extended to the separate geometry results (separate fault result, separate
|
||||
// intersection results), but this requires some refactoring
|
||||
if ( eclView->cellResult() == resultDefinition )
|
||||
{
|
||||
std::set<int> visibleCategorySet = RigVisibleCategoriesCalculator::visibleCategories( eclView );
|
||||
std::set<int> visibleCategorySet =
|
||||
RigVisibleCategoriesCalculator::visibleCategories( cellVisibilityView, resultDefinition );
|
||||
|
||||
visibleCategoryValues.clear();
|
||||
visibleCategoryValues.insert( visibleCategoryValues.begin(), visibleCategorySet.begin(), visibleCategorySet.end() );
|
||||
}
|
||||
// If we have a view, use the unique values defined by visible cells in this view
|
||||
visibleCategoryValues.clear();
|
||||
visibleCategoryValues.insert( visibleCategoryValues.begin(), visibleCategorySet.begin(), visibleCategorySet.end() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user