mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
#2625 Completion Type Legend : Update property editor categories
This commit is contained in:
parent
41d92832a7
commit
0f696b81fe
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user