mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 23:36:50 -06:00
#2276 : Source Stepping : Improve region ordering
Internally, region numbers are stored in a set and then ordered correctly. When converting to strings for UI, the sorting criteria changes, and the order is wrong. If a vector is used to represent the UI strings, the problem is solved.
This commit is contained in:
parent
0559084d93
commit
889f615d19
@ -97,29 +97,29 @@ std::set<RifEclipseSummaryAddress::SummaryVarCategory> RiaSummaryCurveAnalyzer::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<QString> RiaSummaryCurveAnalyzer::identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const
|
||||
std::vector<QString> RiaSummaryCurveAnalyzer::identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const
|
||||
{
|
||||
std::set<QString> stringSet;
|
||||
std::vector<QString> stringSet;
|
||||
|
||||
if (category == RifEclipseSummaryAddress::SUMMARY_REGION)
|
||||
{
|
||||
for (const auto& regionNumber : m_regionNumbers)
|
||||
{
|
||||
stringSet.insert(QString::number(regionNumber));
|
||||
stringSet.push_back(QString::number(regionNumber));
|
||||
}
|
||||
}
|
||||
else if (category == RifEclipseSummaryAddress::SUMMARY_WELL)
|
||||
{
|
||||
for (const auto& wellName : m_wellNames)
|
||||
{
|
||||
stringSet.insert(QString::fromStdString(wellName));
|
||||
stringSet.push_back(QString::fromStdString(wellName));
|
||||
}
|
||||
}
|
||||
else if (category == RifEclipseSummaryAddress::SUMMARY_WELL_GROUP)
|
||||
{
|
||||
for (const auto& wellGroupName : m_wellGroupNames)
|
||||
{
|
||||
stringSet.insert(QString::fromStdString(wellGroupName));
|
||||
stringSet.push_back(QString::fromStdString(wellGroupName));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories() const;
|
||||
|
||||
std::set<QString> identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const;
|
||||
std::vector<QString> identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const;
|
||||
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory(const std::vector<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category);
|
||||
|
@ -227,7 +227,7 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
||||
return options;
|
||||
}
|
||||
|
||||
std::set<QString> identifierTexts;
|
||||
std::vector<QString> identifierTexts;
|
||||
|
||||
RifSummaryReaderInterface* reader = firstSummaryReaderForVisibleCurves();
|
||||
if (reader)
|
||||
@ -265,7 +265,7 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
||||
quantityAnalyzer.appendAdresses(subset);
|
||||
for (const auto& quantity : quantityAnalyzer.quantities())
|
||||
{
|
||||
identifierTexts.insert(QString::fromStdString(quantity));
|
||||
identifierTexts.push_back(QString::fromStdString(quantity));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user