mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Range/Property/Well Toggle fixes
* Well cells are now toggled along with pipe geometry by the Well toggle in the tree view. * TP# 4156 Range filter collection toggle does not work This last one was really a huge error on several places in the overall logig of what is shown when. p4#: 22337
This commit is contained in:
@@ -560,8 +560,8 @@ void RimReservoirView::createDisplayModel()
|
||||
if (! this->propertyFilterCollection()->hasActiveFilters())
|
||||
{
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> geometryTypesToAdd;
|
||||
|
||||
if (this->rangeFilterCollection()->hasActiveFilters() || this->wellCollection()->hasVisibleWellCells())
|
||||
|
||||
if (this->rangeFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::RANGE_FILTERED);
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_WELL_CELLS);
|
||||
@@ -572,6 +572,20 @@ void RimReservoirView::createDisplayModel()
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
}
|
||||
else if (!this->rangeFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::VISIBLE_WELL_CELLS);
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::VISIBLE_WELL_FENCE_CELLS);
|
||||
}
|
||||
else if (this->rangeFilterCollection()->hasActiveFilters() && !this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::RANGE_FILTERED);
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_WELL_CELLS);
|
||||
if (this->showInactiveCells())
|
||||
{
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
geometryTypesToAdd.push_back(RivReservoirViewPartMgr::ALL_WELL_CELLS); // Should be all well cells
|
||||
@@ -657,7 +671,6 @@ void RimReservoirView::createDisplayModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimReservoirView::updateCurrentTimeStep()
|
||||
{
|
||||
//printf("########## updateCurrentTimeStep for frame %i ##########\n", m_currentTimeStep.v());
|
||||
std::vector<RivReservoirViewPartMgr::ReservoirGeometryCacheType> geometriesToRecolor;
|
||||
|
||||
if (this->propertyFilterCollection()->hasActiveFilters())
|
||||
@@ -667,7 +680,6 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
std::vector<size_t> gridIndices;
|
||||
this->indicesToVisibleGrids(&gridIndices);
|
||||
|
||||
|
||||
geometriesToRecolor.push_back( RivReservoirViewPartMgr::PROPERTY_FILTERED);
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), RivReservoirViewPartMgr::PROPERTY_FILTERED, m_currentTimeStep, gridIndices);
|
||||
|
||||
@@ -683,8 +695,8 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
{
|
||||
std::vector<size_t> gridIndices;
|
||||
this->indicesToVisibleGrids(&gridIndices);
|
||||
|
||||
if (this->rangeFilterCollection()->hasActiveFilters() || this->wellCollection()->hasVisibleWellCells())
|
||||
|
||||
if (this->rangeFilterCollection()->hasActiveFilters() ) // Wells not considered, because we do not have a INACTIVE_WELL_CELLS group yet.
|
||||
{
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameParts.p(), RivReservoirViewPartMgr::RANGE_FILTERED_INACTIVE, gridIndices);
|
||||
}
|
||||
@@ -707,19 +719,28 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
|
||||
m_visibleGridParts = geometriesToRecolor;
|
||||
}
|
||||
else if (rangeFilterCollection->hasActiveFilters() || this->wellCollection()->hasVisibleWellCells())
|
||||
else if (this->rangeFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::RANGE_FILTERED);
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_WELL_CELLS);
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
}
|
||||
else if (!this->rangeFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::VISIBLE_WELL_CELLS);
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::VISIBLE_WELL_FENCE_CELLS);
|
||||
}
|
||||
else if (this->rangeFilterCollection()->hasActiveFilters() && !this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::RANGE_FILTERED);
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::RANGE_FILTERED_WELL_CELLS);
|
||||
}
|
||||
else
|
||||
{
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::ACTIVE);
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::ALL_WELL_CELLS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (size_t i = 0; i < geometriesToRecolor.size(); ++i)
|
||||
@@ -1392,7 +1413,7 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl
|
||||
for (size_t wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
|
||||
{
|
||||
RimWell* well = this->wellCollection()->wells()[wIdx];
|
||||
if (this->wellCollection()->wellCellsToRangeFilterMode() == RimWellCollection::RANGE_ADD_ALL || well->showWellCells())
|
||||
if (this->wellCollection()->wellCellsToRangeFilterMode() == RimWellCollection::RANGE_ADD_ALL || (well->showWell() && well->showWellCells()) )
|
||||
{
|
||||
RigSingleWellResultsData* wres = well->wellResults();
|
||||
if (!wres) continue;
|
||||
|
||||
Reference in New Issue
Block a user