diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp index 8beea65e6a..dbc73fdf1c 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.cpp @@ -583,72 +583,89 @@ std::string RifEclipseSummaryAddress::uiText() const if ( m_isErrorResult ) text += "ERR:"; text += m_quantityName; + + std::string itemText = itemUiText(); + if ( !itemText.empty() ) + { + text += ":" + itemText; + } + + return text; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::string RifEclipseSummaryAddress::itemUiText() const +{ + std::string text; + switch ( this->category() ) { case SUMMARY_REGION: { - text += ":" + std::to_string( this->regionNumber() ); + text += std::to_string( this->regionNumber() ); } break; case SUMMARY_REGION_2_REGION: { - text += ":" + formatUiTextRegionToRegion(); + text += formatUiTextRegionToRegion(); } break; case SUMMARY_WELL_GROUP: { - text += ":" + this->wellGroupName(); + text += this->wellGroupName(); } break; case SUMMARY_WELL: { - text += ":" + this->wellName(); + text += this->wellName(); } break; case SUMMARY_WELL_COMPLETION: { - text += ":" + this->wellName(); + text += this->wellName(); text += ":" + blockAsString(); } break; case SUMMARY_WELL_LGR: { - text += ":" + this->lgrName(); + text += this->lgrName(); text += ":" + this->wellName(); } break; case SUMMARY_WELL_COMPLETION_LGR: { - text += ":" + this->lgrName(); + text += this->lgrName(); text += ":" + this->wellName(); text += ":" + blockAsString(); } break; case SUMMARY_WELL_SEGMENT: { - text += ":" + this->wellName(); + text += this->wellName(); text += ":" + std::to_string( this->wellSegmentNumber() ); } break; case SUMMARY_BLOCK: { - text += ":" + blockAsString(); + text += blockAsString(); } break; case SUMMARY_BLOCK_LGR: { - text += ":" + this->lgrName(); + text += this->lgrName(); text += ":" + blockAsString(); } break; case SUMMARY_AQUIFER: { - text += ":" + std::to_string( this->aquiferNumber() ); + text += std::to_string( this->aquiferNumber() ); } break; case SUMMARY_CALCULATED: { - text += ":" + std::to_string( this->id() ); + text += std::to_string( this->id() ); } break; } @@ -657,7 +674,7 @@ std::string RifEclipseSummaryAddress::uiText() const } //-------------------------------------------------------------------------------------------------- -/// Returns the stringified value for the specified identifier type +/// Returns the stringified address component requested //-------------------------------------------------------------------------------------------------- std::string RifEclipseSummaryAddress::addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType identifierType ) const diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h index 23bcb5acb9..3d6de9e91e 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h @@ -183,6 +183,7 @@ public: // Derived properties std::string uiText() const; + std::string itemUiText() const; std::string addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType itemTypeInput ) const; bool isUiTextMatchingFilterText( const QString& filterString ) const;