#6481 Summary Plot: Detect cumulative fluid components

This commit is contained in:
Magne Sjaastad
2020-10-01 15:48:53 +02:00
parent 1517c6e32a
commit c23c735be3
3 changed files with 40 additions and 3 deletions

View File

@@ -871,9 +871,15 @@ bool RifEclipseSummaryAddress::isValidEclipseCategory() const
QString RifEclipseSummaryAddress::baseQuantityName( const QString& quantityName )
{
QString qBaseName = quantityName;
if ( qBaseName.size() == 8 ) qBaseName.chop( 3 );
while ( qBaseName.endsWith( "_" ) )
qBaseName.chop( 1 );
auto indexToUnderScore = qBaseName.indexOf( "_" );
if ( indexToUnderScore > 0 )
{
qBaseName = qBaseName.left( indexToUnderScore );
}
return qBaseName;
}