mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4699 Guard use of TERNARY cell result in property filters
This commit is contained in:
@@ -1593,23 +1593,6 @@ QList<caf::PdmOptionItemInfo>
|
||||
optionList.push_back( caf::PdmOptionItemInfo( s, s ) );
|
||||
}
|
||||
|
||||
// Ternary Result
|
||||
if ( ternaryEnabled )
|
||||
{
|
||||
bool hasAtLeastOneTernaryComponent = false;
|
||||
if ( cellCenterResultNames.contains( "SOIL" ) )
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
else if ( cellCenterResultNames.contains( "SGAS" ) )
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
else if ( cellCenterResultNames.contains( "SWAT" ) )
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
|
||||
if ( resultCatType == RiaDefines::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent )
|
||||
{
|
||||
optionList.push_front( caf::PdmOptionItemInfo( RiaDefines::ternarySaturationResultName(),
|
||||
RiaDefines::ternarySaturationResultName() ) );
|
||||
}
|
||||
}
|
||||
if ( addPerCellFaceOptionItems )
|
||||
{
|
||||
for ( const QString& s : cellFaceResultNames )
|
||||
@@ -1623,6 +1606,24 @@ QList<caf::PdmOptionItemInfo>
|
||||
optionList.push_back( caf::PdmOptionItemInfo( s, s ) );
|
||||
}
|
||||
}
|
||||
|
||||
// Ternary Result
|
||||
if ( ternaryEnabled )
|
||||
{
|
||||
bool hasAtLeastOneTernaryComponent = false;
|
||||
if ( cellCenterResultNames.contains( "SOIL" ) )
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
else if ( cellCenterResultNames.contains( "SGAS" ) )
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
else if ( cellCenterResultNames.contains( "SWAT" ) )
|
||||
hasAtLeastOneTernaryComponent = true;
|
||||
|
||||
if ( resultCatType == RiaDefines::DYNAMIC_NATIVE && hasAtLeastOneTernaryComponent )
|
||||
{
|
||||
optionList.push_front( caf::PdmOptionItemInfo( RiaDefines::ternarySaturationResultName(),
|
||||
RiaDefines::ternarySaturationResultName() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
optionList.push_front(
|
||||
|
||||
Reference in New Issue
Block a user