#1520 Establish new result type 'Completion Type'

This commit is contained in:
Bjørnar Grip Fjær
2017-05-31 16:16:28 +02:00
parent 8a937116e5
commit b20a563517
22 changed files with 341 additions and 82 deletions

View File

@@ -377,15 +377,24 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
if (this->hasCategoryResult())
{
if (this->resultType() != RimDefines::FORMATION_NAMES)
{
this->legendConfig()->setIntegerCategories(cellResultsData->uniqueCellScalarValues(this->scalarResultIndex()));
}
else
if (this->resultType() == RimDefines::FORMATION_NAMES)
{
const std::vector<QString>& fnVector = eclipseCase->activeFormationNames()->formationNames();
this->legendConfig()->setNamedCategoriesInverse(fnVector);
}
else if (this->resultType() == RimDefines::DYNAMIC_NATIVE && this->resultVariable() == RimDefines::completionTypeResultName())
{
std::vector<QString> ctNames;
for (QString ctName : caf::AppEnum<RimDefines::CompletionType>::uiTexts())
{
ctNames.push_back(ctName);
}
this->legendConfig()->setNamedCategoriesInverse(ctNames);
}
else
{
this->legendConfig()->setIntegerCategories(cellResultsData->uniqueCellScalarValues(this->scalarResultIndex()));
}
}
}
}