Skip to content

Commit

Permalink
#950 Some guarding and data update on changing the active formation n…
Browse files Browse the repository at this point in the history
…ames reference in case. More to do.
  • Loading branch information
JacobStoren committed Nov 2, 2016
1 parent 9e0cf77 commit ca7bd5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 += "..";
Expand Down
12 changes: 11 additions & 1 deletion ApplicationCode/ReservoirDataModel/RigCaseData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
{
Expand Down

0 comments on commit ca7bd5b

Please sign in to comment.