mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add result type and create and use custom legend if possible
* Update submodule * Use postfix functions and add custom color legend * Add type to RigEclipseResultAddress Read types from ROFF and create default legend based on type or custom created legend. * Use caseId to connect legend configuration to result in a case
This commit is contained in:
@@ -1469,6 +1469,19 @@ bool RimEclipseResultDefinition::isCompletionTypeSelected() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseResultDefinition::hasCategoryResult() const
|
||||
{
|
||||
if ( auto* gridCellResults = currentGridCellResults() )
|
||||
{
|
||||
const auto addresses = gridCellResults->existingResults();
|
||||
for ( const auto& address : addresses )
|
||||
{
|
||||
if ( address.resultCatType() == m_resultType() && address.resultName() == m_resultVariable() )
|
||||
{
|
||||
if ( address.dataType() == RiaDefines::ResultDataType::INTEGER ) return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( this->m_resultType() == RiaDefines::ResultCatType::FORMATION_NAMES && m_eclipseCase && m_eclipseCase->eclipseCaseData() &&
|
||||
!m_eclipseCase->eclipseCaseData()->formationNames().empty() )
|
||||
return true;
|
||||
@@ -1486,9 +1499,7 @@ bool RimEclipseResultDefinition::hasCategoryResult() const
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( !this->hasStaticResult() ) return false;
|
||||
|
||||
return RiaDefines::isNativeCategoryResult( this->resultVariable() );
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user