#11077 Create result values for formations only when required

This commit is contained in:
Magne Sjaastad 2024-01-31 15:27:19 +01:00
parent 57cb3c0a0b
commit 5c92cf1511

View File

@ -2779,6 +2779,13 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
{
m_activeFormationNamesData = activeFormationNames;
if ( !activeFormationNames )
{
clearScalarResult(
RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES, RiaResultNames::activeFormationNamesResultName() ) );
return;
}
size_t totalGlobCellCount = m_ownerMainGrid->globalCellArray().size();
addStaticScalarResult( RiaDefines::ResultCatType::FORMATION_NAMES, RiaResultNames::activeFormationNamesResultName(), false, totalGlobCellCount );