mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
Missing updates of property filtered cells
1. When Rangefilters changed 2. When the rangefilter collection was turned off
This commit is contained in:
parent
2b881f2cb8
commit
4fabc509a0
@ -109,6 +109,8 @@ void RivGeoMechVizLogic::updateStaticCellColors(int timeStepIndex)
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivGeoMechVizLogic::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
void RivGeoMechVizLogic::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
||||||
{
|
{
|
||||||
|
this->scheduleRegenOfDirectlyDependentGeometry(geometryType);
|
||||||
|
|
||||||
int frameCount = m_geomechView->geoMechCase()->geoMechData()->femPartResults()->frameCount();
|
int frameCount = m_geomechView->geoMechCase()->geoMechData()->femPartResults()->frameCount();
|
||||||
|
|
||||||
for (int fIdx = -1; fIdx < frameCount; ++fIdx)
|
for (int fIdx = -1; fIdx < frameCount; ++fIdx)
|
||||||
@ -118,6 +120,14 @@ void RivGeoMechVizLogic::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RivGeoMechVizLogic::scheduleRegenOfDirectlyDependentGeometry(RivCellSetEnum geometryType)
|
||||||
|
{
|
||||||
|
if (geometryType == RANGE_FILTERED)
|
||||||
|
{
|
||||||
|
this->scheduleGeometryRegen(PROPERTY_FILTERED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -175,19 +185,31 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr(RivGeoMechPartMgrCache:
|
|||||||
}
|
}
|
||||||
else if (pMgrKey.geometryType() == PROPERTY_FILTERED)
|
else if (pMgrKey.geometryType() == PROPERTY_FILTERED)
|
||||||
{
|
{
|
||||||
RivGeoMechPartMgr* rangefiltered = getUpdatedPartMgr(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1));
|
RivGeoMechPartMgr* rangefiltered = NULL;
|
||||||
cvf::ref<cvf::UByteArray> rangeFiltVisibility = rangefiltered->cellVisibility(femPartIdx);
|
if (m_geomechView->rangeFilterCollection()->hasActiveFilters())
|
||||||
|
{
|
||||||
|
rangefiltered = getUpdatedPartMgr(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rangefiltered = getUpdatedPartMgr(RivGeoMechPartMgrCache::Key(ALL_CELLS, -1));
|
||||||
|
}
|
||||||
|
cvf::ref<cvf::UByteArray> rangeFiltVisibility = rangefiltered->cellVisibility(femPartIdx);
|
||||||
|
|
||||||
RivFemElmVisibilityCalculator::computePropertyVisibility(elmVisibility.p(),
|
RivFemElmVisibilityCalculator::computePropertyVisibility(elmVisibility.p(),
|
||||||
caseData->femParts()->part(femPartIdx),
|
caseData->femParts()->part(femPartIdx),
|
||||||
pMgrKey.frameIndex(),
|
pMgrKey.frameIndex(),
|
||||||
rangeFiltVisibility.p(),
|
rangeFiltVisibility.p(),
|
||||||
m_geomechView->propertyFilterCollection()
|
m_geomechView->propertyFilterCollection()
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else if (pMgrKey.geometryType() == ALL_CELLS)
|
||||||
|
{
|
||||||
|
RivFemElmVisibilityCalculator::computeAllVisible(elmVisibility.p(), caseData->femParts()->part(femPartIdx));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RivFemElmVisibilityCalculator::computeAllVisible(elmVisibility.p(), caseData->femParts()->part(femPartIdx));
|
CVF_ASSERT(false); // Unsupported CellSet Enum
|
||||||
}
|
}
|
||||||
|
|
||||||
partMgrToUpdate->setCellVisibility(femPartIdx, elmVisibility.p());
|
partMgrToUpdate->setCellVisibility(femPartIdx, elmVisibility.p());
|
||||||
|
@ -51,6 +51,7 @@ private:
|
|||||||
|
|
||||||
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex);
|
std::vector<RivGeoMechPartMgrCache::Key> keysToVisiblePartMgrs(int timeStepIndex);
|
||||||
RivGeoMechPartMgr* getUpdatedPartMgr(RivGeoMechPartMgrCache::Key partMgrKey);
|
RivGeoMechPartMgr* getUpdatedPartMgr(RivGeoMechPartMgrCache::Key partMgrKey);
|
||||||
|
void scheduleRegenOfDirectlyDependentGeometry(RivCellSetEnum geometryType);
|
||||||
|
|
||||||
cvf::ref<RivGeoMechPartMgrCache> m_partMgrCache;
|
cvf::ref<RivGeoMechPartMgrCache> m_partMgrCache;
|
||||||
RimGeoMechView* m_geomechView;
|
RimGeoMechView* m_geomechView;
|
||||||
|
Loading…
Reference in New Issue
Block a user