mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added checkbox for hiding NNC geometry when no NNC data is available
This commit is contained in:
@@ -649,12 +649,19 @@ void RivFaultPartMgr::updateNNCColors(RimResultSlot* cellResultSlot)
|
||||
{
|
||||
if (m_NNCFaces.isNull()) return;
|
||||
|
||||
if (cellResultSlot
|
||||
&& ( cellResultSlot->resultVariable() == RimDefines::combinedTransmissibilityResultName()
|
||||
|| cellResultSlot->resultVariable() == RimDefines::combinedRiTransResultName()
|
||||
|| cellResultSlot->resultVariable() == RimDefines::combinedRiMultResultName()
|
||||
|| cellResultSlot->resultVariable() == RimDefines::combinedRiAreaNormTransResultName()
|
||||
))
|
||||
bool showNncsWithScalarMappedColor = false;
|
||||
|
||||
if (cellResultSlot)
|
||||
{
|
||||
size_t scalarSetIndex = cellResultSlot->scalarResultIndex();
|
||||
|
||||
if (m_grid->mainGrid()->nncData()->hasScalarValues(scalarSetIndex))
|
||||
{
|
||||
showNncsWithScalarMappedColor = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (showNncsWithScalarMappedColor)
|
||||
{
|
||||
size_t scalarSetIndex = cellResultSlot->scalarResultIndex();
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
RimFaultCollection* faultCollection = m_reservoirView->faultCollection();
|
||||
if (!faultCollection) return;
|
||||
|
||||
RimFaultResultSlot* faultResultSlot = m_reservoirView->faultResultSettings();
|
||||
|
||||
bool isShowingGrid = faultCollection->isGridVisualizationMode();
|
||||
if (!faultCollection->showFaultCollection() && !isShowingGrid) return;
|
||||
|
||||
@@ -144,7 +146,16 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
{
|
||||
if (faultCollection->showNNCs())
|
||||
{
|
||||
rivFaultPart->appendNNCFacesToModel(&parts);
|
||||
bool showNncs = true;
|
||||
if (faultResultSlot->hideNncsWhenNoResultIsAvailable())
|
||||
{
|
||||
showNncs = faultResultSlot->isNncResultAvailable();
|
||||
}
|
||||
|
||||
if (showNncs)
|
||||
{
|
||||
rivFaultPart->appendNNCFacesToModel(&parts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
|
||||
const double lowerBound = (*pfIt)->lowerBound();
|
||||
const double upperBound = (*pfIt)->upperBound();
|
||||
|
||||
size_t scalarResultIndex = (*pfIt)->resultDefinition->gridScalarIndex();
|
||||
size_t scalarResultIndex = (*pfIt)->resultDefinition->scalarResultIndex();
|
||||
|
||||
size_t adjustedTimeStepIndex = timeStepIndex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user