Rename method in RifEclipseSummaryAddress

to make address component access clearer
This commit is contained in:
Jacob Støren 2020-02-25 10:27:24 +01:00
parent 692ed80c26
commit 2a4fd959e9
3 changed files with 8 additions and 5 deletions

View File

@ -659,7 +659,8 @@ std::string RifEclipseSummaryAddress::uiText() const
//--------------------------------------------------------------------------------------------------
/// Returns the stringified value for the specified identifier type
//--------------------------------------------------------------------------------------------------
std::string RifEclipseSummaryAddress::uiText( RifEclipseSummaryAddress::SummaryIdentifierType identifierType ) const
std::string
RifEclipseSummaryAddress::addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType identifierType ) const
{
switch ( identifierType )
{

View File

@ -183,7 +183,7 @@ public:
// Derived properties
std::string uiText() const;
std::string uiText( RifEclipseSummaryAddress::SummaryIdentifierType itemTypeInput ) const;
std::string addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType itemTypeInput ) const;
bool isUiTextMatchingFilterText( const QString& filterString ) const;
bool isValid() const;

View File

@ -642,7 +642,8 @@ void RiuSummaryVectorSelectionUi::setSelectedCurveDefinitions( const std::vector
for ( const auto& identifierAndField : identifierAndFieldList )
{
bool isVectorField = identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
QString avalue = QString::fromStdString( summaryAddress.uiText( identifierAndField->summaryIdentifier() ) );
QString avalue =
QString::fromStdString( summaryAddress.addressComponentUiText( identifierAndField->summaryIdentifier() ) );
if ( isVectorField && isObservedDataCase )
{
avalue = avalue + QString( OBSERVED_DATA_AVALUE_POSTFIX );
@ -1131,7 +1132,8 @@ bool RiuSummaryVectorSelectionUi::isAddressCompatibleWithControllingFieldSelecti
bool match = false;
for ( const auto& selectedText : identifierAndField->pdmField()->v() )
{
if ( QString::compare( QString::fromStdString( address.uiText( identifierAndField->summaryIdentifier() ) ),
if ( QString::compare( QString::fromStdString(
address.addressComponentUiText( identifierAndField->summaryIdentifier() ) ),
selectedText ) == 0 )
{
match = true;
@ -1440,7 +1442,7 @@ void RiuSummaryVectorSelectionUi::appendOptionItemsForSubCategoriesAndVectors( Q
{
if ( address.isErrorResult() ) continue;
auto name = address.uiText( identifierAndField->summaryIdentifier() );
auto name = address.addressComponentUiText( identifierAndField->summaryIdentifier() );
if ( name.size() > 0 )
{
if ( i == CALCULATED_CURVES )