#945 Use visible grid parts to force watertight faults

This commit is contained in:
Magne Sjaastad
2016-11-21 11:30:36 +01:00
parent 50c5ff8da4
commit 7d52242285
4 changed files with 38 additions and 148 deletions

View File

@@ -1044,25 +1044,25 @@ void RivReservoirViewPartMgr::appendFaultsDynamicGeometryPartsToModel(cvf::Model
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivCellSetEnum RivReservoirViewPartMgr::geometryTypeForFaultLabels(const std::vector<RivCellSetEnum>& geometryTypes, bool showFaultsOutsideFilters) const
RivCellSetEnum RivReservoirViewPartMgr::geometryTypeForFaultLabels(const std::set<RivCellSetEnum>& geometryTypes, bool showFaultsOutsideFilters) const
{
bool hasInactive = false;
for (size_t i = 0; i < geometryTypes.size(); i++)
for (RivCellSetEnum cellSetType : geometryTypes)
{
if (!showFaultsOutsideFilters)
{
if (geometryTypes[i] == PROPERTY_FILTERED)
if (cellSetType == PROPERTY_FILTERED)
{
return PROPERTY_FILTERED;
}
if (geometryTypes[i] == RANGE_FILTERED)
if (cellSetType == RANGE_FILTERED)
{
return RANGE_FILTERED;
}
}
if (geometryTypes[i] == INACTIVE)
if (cellSetType == INACTIVE)
{
hasInactive = true;
}