mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#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:
@@ -175,6 +175,7 @@ void RimSummaryCurveCollection::deleteCurve(RimSummaryCurve* curve)
|
||||
{
|
||||
m_curves.removeChildObject(curve);
|
||||
delete curve;
|
||||
updateCaseNameHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,24 +187,6 @@ std::vector<RimSummaryCurve*> RimSummaryCurveCollection::curves() const
|
||||
return m_curves.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSummaryCurve*> RimSummaryCurveCollection::visibleCurves() const
|
||||
{
|
||||
std::vector<RimSummaryCurve*> visible;
|
||||
|
||||
for (auto c : m_curves)
|
||||
{
|
||||
if (c->isCurveVisible())
|
||||
{
|
||||
visible.push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
return visible;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -250,6 +233,8 @@ void RimSummaryCurveCollection::updateCaseNameHasChanged()
|
||||
|
||||
RimSummaryPlot* parentPlot;
|
||||
firstAncestorOrThisOfTypeAsserted(parentPlot);
|
||||
|
||||
parentPlot->updatePlotTitle();
|
||||
if (parentPlot->qwtPlot()) parentPlot->qwtPlot()->updateLegend();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user