Always use category result when creating legend for formations

This commit is contained in:
Magne Sjaastad
2023-12-07 14:10:03 +01:00
parent cf9a9d4bad
commit 47e9046785

View File

@@ -145,7 +145,10 @@ void RimEclipseCellColors::changeLegendConfig( QString resultVarNameOfNewLegend
int caseId = 0;
if ( eclipseCase() ) caseId = eclipseCase()->caseId();
auto newLegend = createLegendForResult( caseId, resultVarNameOfNewLegend, m_useDiscreteLogLevels, hasCategoryResult() );
bool useCategoryLegend = hasCategoryResult();
if ( m_resultType() == RiaDefines::ResultCatType::FORMATION_NAMES ) useCategoryLegend = true;
auto newLegend = createLegendForResult( caseId, resultVarNameOfNewLegend, m_useDiscreteLogLevels, useCategoryLegend );
newLegend->changed.connect( this, &RimEclipseCellColors::onLegendConfigChanged );