#5358, #5317, #5019 Fix several issues regarding separate results definitions

This commit is contained in:
Jacob Støren
2020-01-21 15:13:29 +01:00
parent 2adefbcb04
commit 27737b51bc
10 changed files with 157 additions and 18 deletions

View File

@@ -20,6 +20,7 @@
#include "RiaApplication.h"
#include "RimGridView.h"
#include "RimIntersectionResultDefinition.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSurfaceCollection.h"
@@ -160,9 +161,11 @@ void RimSurfaceInViewCollection::updateCellResultColor( bool hasGeneralCellResul
{
if ( surf->isActive() )
{
bool hasSeparateInterResult = false; // surf->activeSeparateResultDefinition() &&
// surf->activeSeparateResultDefinition()->hasResult();
if ( hasSeparateInterResult || hasGeneralCellResult )
bool showResults = surf->activeSeparateResultDefinition()
? surf->activeSeparateResultDefinition()->hasResult()
: hasGeneralCellResult;
if ( showResults )
{
surf->surfacePartMgr()->updateCellResultColor( timeStepIndex );
}
@@ -173,3 +176,38 @@ void RimSurfaceInViewCollection::updateCellResultColor( bool hasGeneralCellResul
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::applySingleColorEffect()
{
if ( !this->m_isActive() ) return;
for ( RimSurfaceInView* surf : m_surfacesInView )
{
if ( surf->isActive() )
{
surf->surfacePartMgr()->applySingleColor();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSurfaceInViewCollection::hasAnyActiveSeparateResults()
{
if ( !this->m_isActive() ) return false;
for ( RimSurfaceInView* surf : m_surfacesInView )
{
if ( surf->isActive() && surf->activeSeparateResultDefinition() &&
surf->activeSeparateResultDefinition()->hasResult() )
{
return true;
}
}
return false;
}