#3809 Make Flow diagnostics work with contour maps

This commit is contained in:
Gaute Lindkvist 2018-11-30 13:47:46 +01:00
parent 4d765f19b6
commit 20534775d6

View File

@ -781,9 +781,13 @@ bool RimContourMapProjection::hasResultInCell(uint i, uint j) const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
double RimContourMapProjection::calculateValueInCell(uint i, uint j) const double RimContourMapProjection::calculateValueInCell(uint i, uint j) const
{ {
if (!isColumnResult() && view()->cellResult()->scalarResultIndex() == cvf::UNDEFINED_SIZE_T) if (!isColumnResult())
{ {
return 0.0; // Special case of NONE-result. Show 0 all over to ensure we see something. if (!view()->cellResult()->isFlowDiagOrInjectionFlooding() &&
view()->cellResult()->scalarResultIndex() == cvf::UNDEFINED_SIZE_T)
{
return 0.0; // Special case of NONE-result. Show 0 all over to ensure we see something.
}
} }
const std::vector<std::pair<size_t, double>>& matchingCells = cellsAtIJ(i, j); const std::vector<std::pair<size_t, double>>& matchingCells = cellsAtIJ(i, j);
if (!matchingCells.empty()) if (!matchingCells.empty())