mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Faults: Fixed update of fault colors (missing files from previous commit)
This commit is contained in:
parent
f477d7ade6
commit
271eb755eb
@ -825,6 +825,16 @@ RivReservoirPartMgr * RivReservoirViewPartMgr::reservoirPartManager(ReservoirGeo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::updateFaultColors(ReservoirGeometryCacheType geometryType, size_t timeStepIndex, RimResultSlot* cellResultSlot)
|
||||
{
|
||||
if (geometryType == PROPERTY_FILTERED && timeStepIndex >= m_propFilteredGeometryFrames.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (geometryType == PROPERTY_FILTERED_WELL_CELLS && timeStepIndex >= m_propFilteredWellGeometryFrames.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RivReservoirPartMgr* pmgr = reservoirPartManager(geometryType, timeStepIndex);
|
||||
pmgr->updateFaultColors(timeStepIndex, cellResultSlot);
|
||||
}
|
||||
@ -904,26 +914,6 @@ void RivReservoirViewPartMgr::appendFaultLabelsDynamicGeometryPartsToModel(cvf::
|
||||
m_propFilteredGeometryFrames[frameIndex]->appendFaultLabelPartsToModel(model);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> RivReservoirViewPartMgr::defaultVisibleFaultTypes()
|
||||
{
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> types;
|
||||
|
||||
types.push_back(ACTIVE);
|
||||
types.push_back(ALL_WELL_CELLS);
|
||||
types.push_back(VISIBLE_WELL_CELLS);
|
||||
types.push_back(VISIBLE_WELL_FENCE_CELLS);
|
||||
types.push_back(RANGE_FILTERED);
|
||||
types.push_back(RANGE_FILTERED_WELL_CELLS);
|
||||
types.push_back(VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
types.push_back(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -646,8 +646,12 @@ void RimReservoirView::createDisplayModel()
|
||||
}
|
||||
|
||||
updateFaultForcedVisibility();
|
||||
|
||||
}
|
||||
|
||||
this->updateFaultColors();
|
||||
|
||||
|
||||
// Compute triangle count, Debug only
|
||||
|
||||
if (false)
|
||||
@ -824,24 +828,7 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
}
|
||||
}
|
||||
|
||||
// Update all fault geometry
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> faultGeometriesToRecolor;
|
||||
|
||||
if (this->propertyFilterCollection()->hasActiveFilters() && !faultCollection()->showFaultsOutsideFilters)
|
||||
{
|
||||
faultGeometriesToRecolor.push_back(RivReservoirViewPartMgr::PROPERTY_FILTERED);
|
||||
faultGeometriesToRecolor.push_back(RivReservoirViewPartMgr::PROPERTY_FILTERED_WELL_CELLS);
|
||||
}
|
||||
else
|
||||
{
|
||||
faultGeometriesToRecolor = RivReservoirViewPartMgr::defaultVisibleFaultTypes();
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < faultGeometriesToRecolor.size(); ++i)
|
||||
{
|
||||
m_reservoirGridPartManager->updateFaultColors(faultGeometriesToRecolor[i], m_currentTimeStep, this->cellResult());
|
||||
}
|
||||
|
||||
this->updateFaultColors();
|
||||
|
||||
// Well pipes and well paths
|
||||
if (m_viewer)
|
||||
@ -1925,7 +1912,18 @@ std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> RimReservoirVie
|
||||
{
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> faultParts;
|
||||
|
||||
if (this->faultCollection()->showFaultsOutsideFilters())
|
||||
if (this->propertyFilterCollection()->hasActiveFilters() && !faultCollection()->showFaultsOutsideFilters)
|
||||
{
|
||||
faultParts.push_back(RivReservoirViewPartMgr::PROPERTY_FILTERED);
|
||||
faultParts.push_back(RivReservoirViewPartMgr::PROPERTY_FILTERED_WELL_CELLS);
|
||||
|
||||
if (this->showInactiveCells())
|
||||
{
|
||||
faultParts.push_back(RivReservoirViewPartMgr::INACTIVE);
|
||||
faultParts.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
}
|
||||
else if (this->faultCollection()->showFaultsOutsideFilters())
|
||||
{
|
||||
faultParts.push_back(RivReservoirViewPartMgr::ACTIVE);
|
||||
faultParts.push_back(RivReservoirViewPartMgr::ALL_WELL_CELLS);
|
||||
@ -1981,3 +1979,17 @@ std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> RimReservoirVie
|
||||
|
||||
return faultParts;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimReservoirView::updateFaultColors()
|
||||
{
|
||||
// Update all fault geometry
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> faultGeometriesToRecolor = visibleFaultParts();
|
||||
|
||||
for (size_t i = 0; i < faultGeometriesToRecolor.size(); ++i)
|
||||
{
|
||||
m_reservoirGridPartManager->updateFaultColors(faultGeometriesToRecolor[i], m_currentTimeStep, this->cellResult());
|
||||
}
|
||||
}
|
||||
|
@ -192,6 +192,7 @@ private:
|
||||
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> visibleFaultParts() const;
|
||||
void updateFaultForcedVisibility();
|
||||
void updateFaultColors();
|
||||
|
||||
|
||||
cvf::ref<RivReservoirViewPartMgr> m_reservoirGridPartManager;
|
||||
|
Loading…
Reference in New Issue
Block a user