mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3904 Summary : Move function
This commit is contained in:
parent
cad072ba0b
commit
b7e569d09a
@ -185,6 +185,24 @@ std::vector<RifEclipseSummaryAddress>
|
||||
return filteredAddresses;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RiaSummaryCurveAnalyzer::correspondingHistorySummaryCurveName(const std::string& curveName)
|
||||
{
|
||||
static std::string historyIdentifier = "H";
|
||||
|
||||
if (RiaStdStringTools::endsWith(curveName, historyIdentifier))
|
||||
{
|
||||
std::string candidate = curveName.substr(0, curveName.size() - 1);
|
||||
return candidate;
|
||||
}
|
||||
else
|
||||
{
|
||||
return curveName + historyIdentifier;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -58,6 +58,8 @@ public:
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory(const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category);
|
||||
|
||||
static std::string correspondingHistorySummaryCurveName(const std::string& curveName);
|
||||
|
||||
private:
|
||||
void assignCategoryToQuantities() const;
|
||||
void computeQuantityNamesWithHistory() const;
|
||||
|
@ -965,8 +965,8 @@ bool RimSummaryPlotSourceStepping::updateHistoryAndSummaryQuantityIfMatching(con
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string correspondingOldString = correspondingHistorySummaryCurveName(oldString);
|
||||
std::string correspondingNewString = correspondingHistorySummaryCurveName(newString);
|
||||
std::string correspondingOldString = RiaSummaryCurveAnalyzer::correspondingHistorySummaryCurveName(oldString);
|
||||
std::string correspondingNewString = RiaSummaryCurveAnalyzer::correspondingHistorySummaryCurveName(newString);
|
||||
|
||||
if (adr->quantityName() == correspondingOldString)
|
||||
{
|
||||
@ -978,24 +978,6 @@ bool RimSummaryPlotSourceStepping::updateHistoryAndSummaryQuantityIfMatching(con
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RimSummaryPlotSourceStepping::correspondingHistorySummaryCurveName(const std::string& curveName)
|
||||
{
|
||||
static std::string historyIdentifier = "H";
|
||||
|
||||
if (RiaStdStringTools::endsWith(curveName, historyIdentifier))
|
||||
{
|
||||
std::string candidate = curveName.substr(0, curveName.size() - 1);
|
||||
return candidate;
|
||||
}
|
||||
else
|
||||
{
|
||||
return curveName + historyIdentifier;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -106,8 +106,6 @@ private:
|
||||
const QVariant& newValue,
|
||||
RifEclipseSummaryAddress* adr);
|
||||
|
||||
static std::string correspondingHistorySummaryCurveName(const std::string& curveName);
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
||||
caf::PdmPtrField<RimSummaryCaseCollection*> m_ensemble;
|
||||
|
Loading…
Reference in New Issue
Block a user