mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-15 01:42:13 -05:00
#4581 Summary Plot: Add isHistoryQuantity
This commit is contained in:
1 parent
c78b435864
commit
c5542463aa
3 files changed
+13
-3
No files matched your search
@@ -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())
|
||||
|
||||
Reference in new issue
Block a user