#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

@@ -106,9 +106,10 @@ void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult
{
if ( cs->isActive() )
{
bool hasSeparateInterResult = cs->activeSeparateResultDefinition() &&
cs->activeSeparateResultDefinition()->hasResult();
if ( hasSeparateInterResult || hasGeneralCellResult )
bool showResults = cs->activeSeparateResultDefinition() ? cs->activeSeparateResultDefinition()->hasResult()
: hasGeneralCellResult;
if ( showResults )
{
cs->intersectionPartMgr()->updateCellResultColor( timeStepIndex, nullptr, nullptr );
}
@@ -137,6 +138,31 @@ void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIntersectionCollection::hasAnyActiveSeparateResults()
{
if ( !this->isActive() ) return false;
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
if ( cs->isActive() && cs->activeSeparateResultDefinition() && cs->activeSeparateResultDefinition()->hasResult() )
{
return true;
}
}
for ( RimBoxIntersection* cs : m_intersectionBoxes )
{
if ( cs->isActive() && cs->activeSeparateResultDefinition() && cs->activeSeparateResultDefinition()->hasResult() )
{
return true;
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------