mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4581 Summary Plot: Add isHistoryQuantity
This commit is contained in:
parent
c78b435864
commit
c5542463aa
@ -537,6 +537,16 @@ bool RifEclipseSummaryAddress::isDependentOnWellName(SummaryVarCategory category
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseSummaryAddress::isHistoryQuantity() const
|
||||
{
|
||||
const std::string historyIdentifier = "H";
|
||||
|
||||
return RiaStdStringTools::endsWith(m_quantityName, historyIdentifier);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -150,6 +150,7 @@ public:
|
||||
|
||||
SummaryVarCategory category() const { return m_variableCategory; }
|
||||
const std::string& quantityName() const { return m_quantityName; }
|
||||
bool isHistoryQuantity() const;
|
||||
|
||||
int regionNumber() const { return m_regionNumber; }
|
||||
int regionNumber2() const { return m_regionNumber2; }
|
||||
|
@ -245,18 +245,17 @@ std::vector<RimEnsembleCurveSet*> RimEnsembleCurveSetCollection::curveSetsForSou
|
||||
{
|
||||
// Add corresponding history/summary curve with or without H
|
||||
|
||||
const std::string historyIdentifier = "H";
|
||||
|
||||
std::string quantity = m_curveSetForSourceStepping->summaryAddress().quantityName();
|
||||
|
||||
std::string candidateName;
|
||||
if (RiaStdStringTools::endsWith(quantity, historyIdentifier))
|
||||
if (m_curveSetForSourceStepping->summaryAddress().isHistoryQuantity())
|
||||
{
|
||||
candidateName = quantity.substr(0, quantity.size() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
candidateName = quantity + historyIdentifier;
|
||||
candidateName = quantity + "H";
|
||||
}
|
||||
|
||||
for (const auto& c : curveSets())
|
||||
|
Loading…
Reference in New Issue
Block a user