mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#950 Some guarding and data update on changing the active formation names reference in case. More to do.
This commit is contained in:
@@ -369,7 +369,7 @@ void RimEclipsePropertyFilter::updateFilterName()
|
||||
{
|
||||
newFiltername += " (";
|
||||
|
||||
if (m_selectedCategoryValues().size() == m_categoryValues.size())
|
||||
if ( m_selectedCategoryValues().size() && m_selectedCategoryValues().size() == m_categoryValues.size() )
|
||||
{
|
||||
newFiltername += QString::number(m_selectedCategoryValues()[0]);
|
||||
newFiltername += "..";
|
||||
|
||||
@@ -503,7 +503,6 @@ void RigCaseData::computeActiveCellsGeometryBoundingBox()
|
||||
void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationNames)
|
||||
{
|
||||
m_activeFormationNamesData = activeFormationNames;
|
||||
if (!activeFormationNames) return;
|
||||
|
||||
size_t totalGlobCellCount = m_mainGrid->globalCellArray().size();
|
||||
size_t resIndex = m_matrixModelResults->addStaticScalarResult(RimDefines::FORMATION_NAMES,
|
||||
@@ -512,6 +511,17 @@ void RigCaseData::setActiveFormationNames(RigFormationNames* activeFormationName
|
||||
totalGlobCellCount);
|
||||
|
||||
std::vector<double>& fnData = m_matrixModelResults->cellScalarResults(resIndex,0);
|
||||
|
||||
if (m_activeFormationNamesData.isNull())
|
||||
{
|
||||
for ( size_t cIdx = 0; cIdx < totalGlobCellCount; ++cIdx )
|
||||
{
|
||||
fnData[cIdx] = HUGE_VAL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
size_t localCellCount = m_mainGrid->cellCount();
|
||||
for (size_t cIdx = 0; cIdx < localCellCount; ++cIdx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user