#992 Fixed invalid access of nullpointer for property filtered geometry

This commit is contained in:
Magne Sjaastad 2016-11-18 10:48:51 +01:00
parent 3ba7ade88e
commit c52e1809ab
3 changed files with 10 additions and 13 deletions

View File

@ -879,17 +879,6 @@ void RivReservoirViewPartMgr::updateCellColor(RivCellSetEnum geometryType, size_
pmgr->updateCellColor(color);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::updateCellColor(RivCellSetEnum geometryType, cvf::Color4f color)
{
//CVF_ASSERT(geometryType != PROPERTY_FILTERED);
//CVF_ASSERT(geometryType != PROPERTY_FILTERED_WELL_CELLS);
updateCellColor(geometryType, 0 , color);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -57,7 +57,6 @@ public:
void appendStaticGeometryPartsToModel (cvf::ModelBasicList* model, RivCellSetEnum geometryType, const std::vector<size_t>& gridIndices);
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex, const std::vector<size_t>& gridIndices);
void updateCellColor (RivCellSetEnum geometryType, cvf::Color4f color);
void updateCellColor (RivCellSetEnum geometryType, size_t timeStepIndex,
cvf::Color4f color);
void updateCellResultColor (RivCellSetEnum geometryType, size_t timeStepIndex,

View File

@ -767,7 +767,16 @@ void RimEclipseView::updateStaticCellColors(RivCellSetEnum geometryType)
case RANGE_FILTERED_INACTIVE: color = cvf::Color4f(cvf::Color3::LIGHT_GRAY); break;
}
m_reservoirGridPartManager->updateCellColor(geometryType, color);
if (geometryType == PROPERTY_FILTERED || geometryType == PROPERTY_FILTERED_WELL_CELLS)
{
// Always use current time step when updating color of property geometry
m_reservoirGridPartManager->updateCellColor(geometryType, m_currentTimeStep, color);
}
else
{
// Use static timestep (timestep 0) for geometry with no change between time steps
m_reservoirGridPartManager->updateCellColor(geometryType, 0, color);
}
}
//--------------------------------------------------------------------------------------------------