Added checkbox for hiding NNC geometry when no NNC data is available

This commit is contained in:
Magne Sjaastad
2014-09-04 09:30:00 +02:00
parent 4fdb06e0e0
commit 5963d75085
6 changed files with 55 additions and 10 deletions

View File

@@ -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();