mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Fix missing formation category
This commit is contained in:
parent
9d29ba47b0
commit
33411b9e79
@ -2122,6 +2122,12 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto uniqueValues = cellResultsData->uniqueCellScalarValues( this->eclipseResultAddress() );
|
auto uniqueValues = cellResultsData->uniqueCellScalarValues( this->eclipseResultAddress() );
|
||||||
|
if ( this->eclipseResultAddress().resultCatType() == RiaDefines::ResultCatType::FORMATION_NAMES )
|
||||||
|
{
|
||||||
|
std::vector<QString> fnVector = eclipseCaseData->formationNames();
|
||||||
|
uniqueValues.resize( fnVector.size() );
|
||||||
|
std::iota( uniqueValues.begin(), uniqueValues.end(), 0 );
|
||||||
|
}
|
||||||
|
|
||||||
cvf::Color3ubArray legendBaseColors = legendConfigToUpdate->colorLegend()->colorArray();
|
cvf::Color3ubArray legendBaseColors = legendConfigToUpdate->colorLegend()->colorArray();
|
||||||
|
|
||||||
@ -2154,17 +2160,20 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
|
|||||||
}
|
}
|
||||||
std::vector<std::tuple<QString, int, cvf::Color3ub>> categoryVector;
|
std::vector<std::tuple<QString, int, cvf::Color3ub>> categoryVector;
|
||||||
|
|
||||||
std::vector<QString> fnVector = eclipseCaseData->formationNames();
|
|
||||||
|
|
||||||
for ( auto value : visibleCategoryValues )
|
for ( auto value : visibleCategoryValues )
|
||||||
{
|
{
|
||||||
cvf::Color3ub categoryColor = categoryMapper->mapToColor( value );
|
cvf::Color3ub categoryColor = categoryMapper->mapToColor( value );
|
||||||
|
|
||||||
QString valueTxt;
|
QString valueTxt;
|
||||||
if ( this->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES )
|
if ( this->resultType() == RiaDefines::ResultCatType::FORMATION_NAMES )
|
||||||
|
{
|
||||||
|
std::vector<QString> fnVector = eclipseCaseData->formationNames();
|
||||||
|
|
||||||
|
if ( value < static_cast<int>( fnVector.size() ) )
|
||||||
{
|
{
|
||||||
valueTxt = fnVector[value];
|
valueTxt = fnVector[value];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
valueTxt = QString( "%1" ).arg( value );
|
valueTxt = QString( "%1" ).arg( value );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user