mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 15:43:07 -06:00
#4877 Detect correct accumulation type for statistics curves
This commit is contained in:
parent
4dcdc2a1ee
commit
1cab88e9c5
@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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<int32_t, int32_t, int32_t> ijkTupleFromUiText( const std::string& s );
|
||||
std::string formatUiTextRegionToRegion() const;
|
||||
std::pair<int16_t, int16_t> regionToRegionPairFromUiText( const std::string& s );
|
||||
|
Loading…
Reference in New Issue
Block a user