#2625 Completion Type Legend : Update property editor categories

This commit is contained in:
Magne Sjaastad
2018-03-21 09:06:16 +01:00
parent 41d92832a7
commit 0f696b81fe
2 changed files with 21 additions and 6 deletions

View File

@@ -389,12 +389,19 @@ void RimEclipsePropertyFilter::computeResultValueRange()
}
else if (resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
{
std::vector<QString> ctNames;
for (QString ctName : caf::AppEnum<RiaDefines::CompletionType>::uiTexts())
std::vector<std::pair<QString, int>> categoryNameAndValues;
{
ctNames.push_back(ctName);
const std::vector<int>& visibleCatetories = results->uniqueCellScalarValues(resultDefinition->scalarResultIndex());
for (auto categoryValue : visibleCatetories)
{
if (caf::AppEnum<RiaDefines::CompletionType>::isValid(categoryValue))
{
auto text = caf::AppEnum<RiaDefines::CompletionType>::uiText(RiaDefines::CompletionType(categoryValue));
categoryNameAndValues.push_back(std::make_pair(text, categoryValue));
}
}
}
setCategoryNames(ctNames);
setCategoryNamesAndValues(categoryNameAndValues);
}
else
{