mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Append vector name if multiple cases are present
This commit is contained in:
parent
eea56e4818
commit
9af9aa7e66
@ -256,3 +256,17 @@ std::string RimMultiSummaryPlotNameHelper::titleCompletion() const
|
|||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
size_t RimMultiSummaryPlotNameHelper::numberOfCases() const
|
||||||
|
{
|
||||||
|
size_t caseCount = 0;
|
||||||
|
for ( auto nameHelper : m_nameHelpers )
|
||||||
|
{
|
||||||
|
caseCount += nameHelper->numberOfCases();
|
||||||
|
}
|
||||||
|
|
||||||
|
return caseCount;
|
||||||
|
}
|
||||||
|
@ -52,6 +52,8 @@ public:
|
|||||||
std::string titleSegment() const override;
|
std::string titleSegment() const override;
|
||||||
std::string titleCompletion() const override;
|
std::string titleCompletion() const override;
|
||||||
|
|
||||||
|
size_t numberOfCases() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<const RimSummaryNameHelper*> m_nameHelpers;
|
std::vector<const RimSummaryNameHelper*> m_nameHelpers;
|
||||||
};
|
};
|
||||||
|
@ -279,8 +279,18 @@ QString RimSummaryCurveAutoName::buildCurveName( const RifEclipseSummaryAddress&
|
|||||||
|
|
||||||
if ( m_caseName && !skipSubString )
|
if ( m_caseName && !skipSubString )
|
||||||
{
|
{
|
||||||
|
const bool isTextEmptyBeforeCaseName = text.empty();
|
||||||
|
|
||||||
if ( !text.empty() ) text += ", ";
|
if ( !text.empty() ) text += ", ";
|
||||||
text += caseName;
|
text += caseName;
|
||||||
|
|
||||||
|
if ( isTextEmptyBeforeCaseName && currentNameHelper && currentNameHelper->numberOfCases() > 1 &&
|
||||||
|
currentNameHelper->vectorNames().size() > 1 )
|
||||||
|
{
|
||||||
|
// Add vector name to the case name if there are multiple cases and multiple vectors
|
||||||
|
|
||||||
|
text += ":" + summaryAddress.vectorName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,4 +59,6 @@ public:
|
|||||||
virtual std::string titleBlock() const = 0;
|
virtual std::string titleBlock() const = 0;
|
||||||
virtual std::string titleSegment() const = 0;
|
virtual std::string titleSegment() const = 0;
|
||||||
virtual std::string titleCompletion() const = 0;
|
virtual std::string titleCompletion() const = 0;
|
||||||
|
|
||||||
|
virtual size_t numberOfCases() const = 0;
|
||||||
};
|
};
|
||||||
|
@ -270,6 +270,14 @@ std::string RimSummaryPlotNameHelper::titleCompletion() const
|
|||||||
return m_titleCompletion;
|
return m_titleCompletion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
size_t RimSummaryPlotNameHelper::numberOfCases() const
|
||||||
|
{
|
||||||
|
return m_summaryCases.size() + m_ensembleCases.size();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -73,6 +73,8 @@ public:
|
|||||||
std::string titleSegment() const override;
|
std::string titleSegment() const override;
|
||||||
std::string titleCompletion() const override;
|
std::string titleCompletion() const override;
|
||||||
|
|
||||||
|
size_t numberOfCases() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void clearTitleSubStrings();
|
void clearTitleSubStrings();
|
||||||
void extractPlotTitleSubStrings();
|
void extractPlotTitleSubStrings();
|
||||||
|
Loading…
Reference in New Issue
Block a user