mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-14 01:13:52 -06:00
Remove ternary from property filter result selection list
This commit is contained in:
parent
79b523522d
commit
7dda4d8437
@ -124,7 +124,26 @@ void RimCellPropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimCellPropertyFilter::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
|
||||
{
|
||||
return resultDefinition->calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
QList<caf::PdmOptionItemInfo> optionItems = resultDefinition->calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
|
||||
|
||||
// Remove ternary from list, as it is not supported to perform filtering on a ternary result
|
||||
int ternaryIndex = -1;
|
||||
for (int i = 0; i < optionItems.size(); i++)
|
||||
{
|
||||
QString text = optionItems[i].optionUiText;
|
||||
|
||||
if (text.compare(RimDefines::ternarySaturationResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
ternaryIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (ternaryIndex != -1)
|
||||
{
|
||||
optionItems.takeAt(ternaryIndex);
|
||||
}
|
||||
|
||||
return optionItems;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user