#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

@@ -379,11 +379,7 @@ void RimEclipsePropertyFilter::computeResultValueRange()
if ( resultDefinition->hasCategoryResult() )
{
if ( resultDefinition->resultType() != RimDefines::FORMATION_NAMES )
{
setCategoryValues(results->cellResults()->uniqueCellScalarValues(scalarIndex));
}
else
if ( resultDefinition->resultType() == RimDefines::FORMATION_NAMES )
{
CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData());
CVF_ASSERT(parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()->activeFormationNames());
@@ -391,6 +387,19 @@ void RimEclipsePropertyFilter::computeResultValueRange()
const std::vector<QString>& fnVector = parentContainer()->reservoirView()->eclipseCase()->eclipseCaseData()->activeFormationNames()->formationNames();
setCategoryNames(fnVector);
}
else if (resultDefinition->resultVariable() == RimDefines::completionTypeResultName())
{
std::vector<QString> ctNames;
for (QString ctName : caf::AppEnum<RimDefines::CompletionType>::uiTexts())
{
ctNames.push_back(ctName);
}
setCategoryNames(ctNames);
}
else
{
setCategoryValues(results->cellResults()->uniqueCellScalarValues(scalarIndex));
}
}
}
}