#2690 Update all summary curves, not just visible when changing the vector for the whole collection

* Also make sure the curve names take into account all curves in the project tree and in the legend text.
* Make sure plot name is updated when a curve is deleted.
This commit is contained in:
Gaute Lindkvist
2018-05-15 08:43:36 +02:00
parent e2dc1486e7
commit 77dd3cbc43
12 changed files with 57 additions and 112 deletions

View File

@@ -272,24 +272,6 @@ std::vector<RimSummaryCurve*> RimEnsembleCurveSet::curves() const
return m_curves.childObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimSummaryCurve*> RimEnsembleCurveSet::visibleCurves() const
{
std::vector<RimSummaryCurve*> visible;
for (const auto& c : m_curves)
{
if (c->isCurveVisible())
{
visible.push_back(c);
}
}
return visible;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -988,7 +970,7 @@ QString RimEnsembleCurveSet::createAutoName() const
RimSummaryPlot* plot = nullptr;
firstAncestorOrThisOfTypeAsserted(plot);
QString curveSetName = m_summaryAddressNameTools->curveNameY(m_yValuesCurveVariable->address(), plot->activePlotTitleHelper());
QString curveSetName = m_summaryAddressNameTools->curveNameY(m_yValuesCurveVariable->address(), plot->activePlotTitleHelperAllCurves());
if (curveSetName.isEmpty())
{
curveSetName = m_summaryAddressNameTools->curveNameY(m_yValuesCurveVariable->address(), nullptr);