#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
{

View File

@ -1360,7 +1360,7 @@ void RimEclipseView::calculateCompletionTypeAndRedrawIfRequired()
{
std::vector<RimCellEdgeMetaData> metaData;
cellEdgeResult()->cellEdgeMetaData(&metaData);
for (const auto cellEdgeMeta : metaData)
for (const auto& cellEdgeMeta : metaData)
{
if (cellEdgeMeta.m_resultVariable == RiaDefines::completionTypeResultName())
{
@ -1374,7 +1374,7 @@ void RimEclipseView::calculateCompletionTypeAndRedrawIfRequired()
isDependingOnCompletionType = true;
}
for (auto propFilter : m_propertyFilterCollection()->propertyFilters)
for (const auto& propFilter : m_propertyFilterCollection()->propertyFilters)
{
if (propFilter->isActive() && propFilter->resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
{
@ -1386,6 +1386,14 @@ void RimEclipseView::calculateCompletionTypeAndRedrawIfRequired()
{
this->loadDataAndUpdate();
}
for (const auto& propFilter : m_propertyFilterCollection()->propertyFilters)
{
if (propFilter->isActive() && propFilter->resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
{
propFilter->updateConnectedEditors();
}
}
}
//--------------------------------------------------------------------------------------------------