#5300 Formations : Make sure views are updated correctly

This commit is contained in:
Magne Sjaastad 2020-01-07 08:47:02 +01:00
parent ff2963293b
commit 79641f090f
2 changed files with 38 additions and 32 deletions

View File

@ -2076,7 +2076,9 @@ void RimEclipseView::defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel,
//--------------------------------------------------------------------------------------------------
bool RimEclipseView::isUsingFormationNames() const
{
if ( ( cellResult()->resultType() == RiaDefines::FORMATION_NAMES ) ) return true;
if ( cellResult()->resultType() == RiaDefines::FORMATION_NAMES ) return true;
if ( faultResultSettings()->customFaultResult()->resultType() == RiaDefines::ALLEN_DIAGRAMS ) return true;
return eclipsePropertyFilterCollection()->isUsingFormationNames();
}

View File

@ -2843,10 +2843,9 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
{
fnData->at( cIdx ) = HUGE_VAL;
}
return;
}
else
{
size_t localCellCount = m_ownerMainGrid->cellCount();
for ( size_t cIdx = 0; cIdx < localCellCount; ++cIdx )
{
@ -2883,6 +2882,7 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
fnData->at( cIdx ) = HUGE_VAL;
}
}
}
computeAllenResults( this, m_ownerMainGrid );
}
@ -3047,7 +3047,11 @@ void RigCaseCellResultsData::computeAllenResults( RigCaseCellResultsData* cellRe
val = 0.0;
}
size_t formationCount = cellResultsData->activeFormationNames()->formationNames().size();
size_t formationCount = 0;
if ( cellResultsData->activeFormationNames() )
{
formationCount = cellResultsData->activeFormationNames()->formationNames().size();
}
const std::vector<RigConnection>& nncConnections = mainGrid->nncData()->connections();