Fixed bug for missing result value during picking for static results

p4#: 21498
This commit is contained in:
Magne Sjaastad
2013-04-30 13:34:49 +02:00
parent 71187d5bbc
commit 445b6edfbd

View File

@@ -912,7 +912,17 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
if (this->cellResult()->hasResult())
{
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, m_currentTimeStep, this->cellResult()->gridScalarIndex());
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject;
if (cellResult->hasStaticResult())
{
dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, 0, this->cellResult()->gridScalarIndex());
}
else
{
dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, m_currentTimeStep, this->cellResult()->gridScalarIndex());
}
if (dataAccessObject.notNull())
{
double scalarValue = dataAccessObject->cellScalar(cellIndex);