mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2287 Calculate Completion Type : Execute loadAndUpdate only when required
This commit is contained in:
parent
69ab95dfed
commit
1583923ed1
@ -268,7 +268,11 @@ void RimEclipseCase::recalculateCompletionTypeAndRedrawAllViews()
|
|||||||
|
|
||||||
for (RimView* view : views())
|
for (RimView* view : views())
|
||||||
{
|
{
|
||||||
view->loadDataAndUpdate();
|
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(view);
|
||||||
|
if (eclipseView)
|
||||||
|
{
|
||||||
|
eclipseView->calculateCompletionTypeAndRedrawIfRequired();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
#include "RimEclipseFaultColors.h"
|
#include "RimEclipseFaultColors.h"
|
||||||
|
#include "RimEclipsePropertyFilter.h"
|
||||||
#include "RimEclipsePropertyFilterCollection.h"
|
#include "RimEclipsePropertyFilterCollection.h"
|
||||||
#include "RimEclipseResultDefinition.h"
|
#include "RimEclipseResultDefinition.h"
|
||||||
#include "RimFaultInViewCollection.h"
|
#include "RimFaultInViewCollection.h"
|
||||||
@ -1401,6 +1402,50 @@ void RimEclipseView::updateDisplayModelForWellResults()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimEclipseView::calculateCompletionTypeAndRedrawIfRequired()
|
||||||
|
{
|
||||||
|
bool isDependingOnCompletionType = false;
|
||||||
|
|
||||||
|
if (cellResult->isCompletionTypeSelected())
|
||||||
|
{
|
||||||
|
isDependingOnCompletionType = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellEdgeResult()->hasResult())
|
||||||
|
{
|
||||||
|
std::vector<RimCellEdgeMetaData> metaData;
|
||||||
|
cellEdgeResult()->cellEdgeMetaData(&metaData);
|
||||||
|
for (const auto cellEdgeMeta : metaData)
|
||||||
|
{
|
||||||
|
if (cellEdgeMeta.m_resultVariable == RiaDefines::completionTypeResultName())
|
||||||
|
{
|
||||||
|
isDependingOnCompletionType = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentFaultResultColors() && currentFaultResultColors()->isCompletionTypeSelected())
|
||||||
|
{
|
||||||
|
isDependingOnCompletionType = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto propFilter : m_propertyFilterCollection()->propertyFilters)
|
||||||
|
{
|
||||||
|
if (propFilter->isActive() && propFilter->resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
|
||||||
|
{
|
||||||
|
isDependingOnCompletionType = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDependingOnCompletionType)
|
||||||
|
{
|
||||||
|
this->loadDataAndUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -131,6 +131,8 @@ public:
|
|||||||
void scheduleReservoirGridGeometryRegen();
|
void scheduleReservoirGridGeometryRegen();
|
||||||
void scheduleSimWellGeometryRegen();
|
void scheduleSimWellGeometryRegen();
|
||||||
void updateDisplayModelForWellResults();
|
void updateDisplayModelForWellResults();
|
||||||
|
|
||||||
|
void calculateCompletionTypeAndRedrawIfRequired();
|
||||||
|
|
||||||
const std::vector<RivCellSetEnum>& visibleGridParts() const;
|
const std::vector<RivCellSetEnum>& visibleGridParts() const;
|
||||||
const RivReservoirViewPartMgr* reservoirGridPartManager() const;
|
const RivReservoirViewPartMgr* reservoirGridPartManager() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user