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:
@@ -537,6 +537,16 @@ bool RifEclipseSummaryAddress::isDependentOnWellName(SummaryVarCategory category
|
|||||||
return false;
|
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; }
|
SummaryVarCategory category() const { return m_variableCategory; }
|
||||||
const std::string& quantityName() const { return m_quantityName; }
|
const std::string& quantityName() const { return m_quantityName; }
|
||||||
|
bool isHistoryQuantity() const;
|
||||||
|
|
||||||
int regionNumber() const { return m_regionNumber; }
|
int regionNumber() const { return m_regionNumber; }
|
||||||
int regionNumber2() const { return m_regionNumber2; }
|
int regionNumber2() const { return m_regionNumber2; }
|
||||||
|
|||||||
@@ -245,18 +245,17 @@ std::vector<RimEnsembleCurveSet*> RimEnsembleCurveSetCollection::curveSetsForSou
|
|||||||
{
|
{
|
||||||
// Add corresponding history/summary curve with or without H
|
// Add corresponding history/summary curve with or without H
|
||||||
|
|
||||||
const std::string historyIdentifier = "H";
|
|
||||||
|
|
||||||
std::string quantity = m_curveSetForSourceStepping->summaryAddress().quantityName();
|
std::string quantity = m_curveSetForSourceStepping->summaryAddress().quantityName();
|
||||||
|
|
||||||
std::string candidateName;
|
std::string candidateName;
|
||||||
if (RiaStdStringTools::endsWith(quantity, historyIdentifier))
|
if (m_curveSetForSourceStepping->summaryAddress().isHistoryQuantity())
|
||||||
{
|
{
|
||||||
candidateName = quantity.substr(0, quantity.size() - 1);
|
candidateName = quantity.substr(0, quantity.size() - 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
candidateName = quantity + historyIdentifier;
|
candidateName = quantity + "H";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& c : curveSets())
|
for (const auto& c : curveSets())
|
||||||
|
|||||||
Reference in New Issue
Block a user