mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#992 Fixed invalid access of nullpointer for property filtered geometry
This commit is contained in:
parent
3ba7ade88e
commit
c52e1809ab
@ -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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user