diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp index fa8abce8f0..63a71959b4 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp @@ -784,7 +784,14 @@ bool RifEclipseSummaryAddress::hasAccumulatedData() const { if ( !isValidEclipseCategory() ) return false; - QString qBaseName = QString::fromStdString( baseQuantityName( quantityName() ) ); + QString quantityForInspection = QString::fromStdString( quantityName() ); + if ( category() == SUMMARY_ENSEMBLE_STATISTICS ) + { + // Remove statistics text prefix + quantityForInspection = quantityForInspection.mid( quantityForInspection.indexOf( ":" ) + 1 ); + } + + QString qBaseName = baseQuantityName( quantityForInspection ); return qBaseName.endsWith( "T" ) || qBaseName.endsWith( "TH" ); } @@ -809,6 +816,7 @@ bool RifEclipseSummaryAddress::isValidEclipseCategory() const case SUMMARY_WELL_SEGMENT: case SUMMARY_BLOCK: case SUMMARY_BLOCK_LGR: + case SUMMARY_ENSEMBLE_STATISTICS: return true; } return false; @@ -817,13 +825,13 @@ bool RifEclipseSummaryAddress::isValidEclipseCategory() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::string RifEclipseSummaryAddress::baseQuantityName( const std::string& quantityName ) +QString RifEclipseSummaryAddress::baseQuantityName( const QString& quantityName ) { - QString qBaseName = QString::fromStdString( quantityName ); + QString qBaseName = quantityName; if ( qBaseName.size() == 8 ) qBaseName.chop( 3 ); while ( qBaseName.endsWith( "_" ) ) qBaseName.chop( 1 ); - return qBaseName.toStdString(); + return qBaseName; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h index 90cc92fd65..d84e1f438e 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h @@ -252,7 +252,7 @@ public: private: bool isValidEclipseCategory() const; - static std::string baseQuantityName( const std::string& quantityName ); + static QString baseQuantityName( const QString& quantityName ); static std::tuple ijkTupleFromUiText( const std::string& s ); std::string formatUiTextRegionToRegion() const; std::pair regionToRegionPairFromUiText( const std::string& s );