mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4482 Summary Plot: Missing curve if same case name, but different folders
This commit is contained in:
parent
a6210cfcc1
commit
a5670cdb0e
@ -142,6 +142,7 @@ QString RiaSummaryCurveDefinition::curveDefinitionText(const QString& caseName,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaSummaryCurveDefinition::operator<(const RiaSummaryCurveDefinition& other) const
|
||||
{
|
||||
if (m_ensemble != other.ensemble())
|
||||
{
|
||||
QString ensembleName;
|
||||
QString otherEnsembleName;
|
||||
@ -156,12 +157,17 @@ bool RiaSummaryCurveDefinition::operator<(const RiaSummaryCurveDefinition& other
|
||||
otherEnsembleName = other.ensemble()->name();
|
||||
}
|
||||
|
||||
// First check if names are different to ensure stable alphabetic sort
|
||||
if (ensembleName != otherEnsembleName)
|
||||
{
|
||||
return ensembleName < otherEnsembleName;
|
||||
}
|
||||
|
||||
// Use pointer address, sorting will be be unstable
|
||||
return m_ensemble < other.ensemble();
|
||||
}
|
||||
|
||||
if (m_summaryCase != other.summaryCase())
|
||||
{
|
||||
QString summaryCaseName;
|
||||
QString otherSummaryCaseName;
|
||||
@ -175,10 +181,14 @@ bool RiaSummaryCurveDefinition::operator<(const RiaSummaryCurveDefinition& other
|
||||
otherSummaryCaseName = other.summaryCase()->caseName();
|
||||
}
|
||||
|
||||
// First check if names are different to ensure stable alphabetic sort
|
||||
if (summaryCaseName != otherSummaryCaseName)
|
||||
{
|
||||
return summaryCaseName < otherSummaryCaseName;
|
||||
}
|
||||
|
||||
// Use pointer address, sorting will be be unstable
|
||||
return m_summaryCase < other.summaryCase();
|
||||
}
|
||||
|
||||
return (m_summaryAddress < other.summaryAddress());
|
||||
|
Loading…
Reference in New Issue
Block a user