mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7207 Fix flow diagnostics cell color when property filtering.
Split RimEclipseView::updateVisibleGeometriesAndCellColors() into two methods, and make sure the visible geometries are recreated before updating the legends.
This commit is contained in:
parent
ad07b18781
commit
18b145268e
@ -241,7 +241,8 @@ void RimEclipseContourMapView::updateGeometry()
|
|||||||
{
|
{
|
||||||
caf::ProgressInfo progress( 100, "Generate Contour Map", true );
|
caf::ProgressInfo progress( 100, "Generate Contour Map", true );
|
||||||
|
|
||||||
this->updateVisibleGeometriesAndCellColors();
|
updateVisibleGeometries();
|
||||||
|
updateVisibleCellColors();
|
||||||
|
|
||||||
{ // Step 1: generate results and some minor updates. About 30% of the time.
|
{ // Step 1: generate results and some minor updates. About 30% of the time.
|
||||||
if ( m_contourMapProjection->isChecked() )
|
if ( m_contourMapProjection->isChecked() )
|
||||||
|
@ -691,9 +691,11 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep()
|
|||||||
|
|
||||||
m_propertyFilterCollection()->updateFromCurrentTimeStep();
|
m_propertyFilterCollection()->updateFromCurrentTimeStep();
|
||||||
|
|
||||||
|
updateVisibleGeometries();
|
||||||
|
|
||||||
onUpdateLegends(); // To make sure the scalar mappers are set up correctly
|
onUpdateLegends(); // To make sure the scalar mappers are set up correctly
|
||||||
|
|
||||||
updateVisibleGeometriesAndCellColors();
|
updateVisibleCellColors();
|
||||||
|
|
||||||
wellCollection()->scaleWellDisks();
|
wellCollection()->scaleWellDisks();
|
||||||
|
|
||||||
@ -713,24 +715,17 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseView::updateVisibleGeometriesAndCellColors()
|
void RimEclipseView::updateVisibleGeometries()
|
||||||
{
|
{
|
||||||
std::vector<RivCellSetEnum> geometriesToRecolor;
|
if ( this->viewController() && this->viewController()->isVisibleCellsOveridden() ) return;
|
||||||
|
|
||||||
if ( this->viewController() && this->viewController()->isVisibleCellsOveridden() )
|
if ( this->eclipsePropertyFilterCollection()->hasActiveFilters() )
|
||||||
{
|
|
||||||
geometriesToRecolor.push_back( OVERRIDDEN_CELL_VISIBILITY );
|
|
||||||
}
|
|
||||||
else if ( this->eclipsePropertyFilterCollection()->hasActiveFilters() )
|
|
||||||
{
|
{
|
||||||
cvf::ref<cvf::ModelBasicList> frameParts = new cvf::ModelBasicList;
|
cvf::ref<cvf::ModelBasicList> frameParts = new cvf::ModelBasicList;
|
||||||
frameParts->setName( "GridModel" );
|
frameParts->setName( "GridModel" );
|
||||||
|
|
||||||
std::vector<size_t> gridIndices = this->indicesToVisibleGrids();
|
std::vector<size_t> gridIndices = this->indicesToVisibleGrids();
|
||||||
|
|
||||||
geometriesToRecolor.push_back( PROPERTY_FILTERED );
|
|
||||||
geometriesToRecolor.push_back( PROPERTY_FILTERED_WELL_CELLS );
|
|
||||||
|
|
||||||
if ( isGridVisualizationMode() )
|
if ( isGridVisualizationMode() )
|
||||||
{
|
{
|
||||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel( frameParts.p(),
|
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel( frameParts.p(),
|
||||||
@ -748,7 +743,11 @@ void RimEclipseView::updateVisibleGeometriesAndCellColors()
|
|||||||
m_reservoirGridPartManager->ensureDynamicGeometryPartsCreated( PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep );
|
m_reservoirGridPartManager->ensureDynamicGeometryPartsCreated( PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep );
|
||||||
}
|
}
|
||||||
|
|
||||||
setVisibleGridParts( geometriesToRecolor );
|
std::vector<RivCellSetEnum> visibleGridParts;
|
||||||
|
visibleGridParts.push_back( PROPERTY_FILTERED );
|
||||||
|
visibleGridParts.push_back( PROPERTY_FILTERED_WELL_CELLS );
|
||||||
|
|
||||||
|
setVisibleGridParts( visibleGridParts );
|
||||||
setVisibleGridPartsWatertight();
|
setVisibleGridPartsWatertight();
|
||||||
|
|
||||||
std::set<RivCellSetEnum> faultGeometryTypesToAppend = allVisibleFaultGeometryTypes();
|
std::set<RivCellSetEnum> faultGeometryTypesToAppend = allVisibleFaultGeometryTypes();
|
||||||
@ -824,6 +823,24 @@ void RimEclipseView::updateVisibleGeometriesAndCellColors()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimEclipseView::updateVisibleCellColors()
|
||||||
|
{
|
||||||
|
std::vector<RivCellSetEnum> geometriesToRecolor;
|
||||||
|
|
||||||
|
if ( this->viewController() && this->viewController()->isVisibleCellsOveridden() )
|
||||||
|
{
|
||||||
|
geometriesToRecolor.push_back( OVERRIDDEN_CELL_VISIBILITY );
|
||||||
|
}
|
||||||
|
else if ( this->eclipsePropertyFilterCollection()->hasActiveFilters() )
|
||||||
|
{
|
||||||
|
geometriesToRecolor.push_back( PROPERTY_FILTERED );
|
||||||
|
geometriesToRecolor.push_back( PROPERTY_FILTERED_WELL_CELLS );
|
||||||
|
}
|
||||||
else if ( this->cellFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells() )
|
else if ( this->cellFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells() )
|
||||||
{
|
{
|
||||||
geometriesToRecolor.push_back( RANGE_FILTERED );
|
geometriesToRecolor.push_back( RANGE_FILTERED );
|
||||||
|
@ -162,7 +162,9 @@ protected:
|
|||||||
|
|
||||||
bool isShowingActiveCellsOnly() override;
|
bool isShowingActiveCellsOnly() override;
|
||||||
void onUpdateDisplayModelForCurrentTimeStep() override;
|
void onUpdateDisplayModelForCurrentTimeStep() override;
|
||||||
void updateVisibleGeometriesAndCellColors();
|
void updateVisibleCellColors();
|
||||||
|
void updateVisibleGeometries();
|
||||||
|
|
||||||
void appendWellsAndFracturesToModel();
|
void appendWellsAndFracturesToModel();
|
||||||
void appendElementVectorResultToModel();
|
void appendElementVectorResultToModel();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user