mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
#2657 Add title to legend, and hide the legend when ensemble curve set are not visible
This commit is contained in:
parent
72fc66f827
commit
4d1595681a
@ -172,15 +172,6 @@ void RimEnsembleCurveSet::loadDataAndUpdate(bool updateParentPlot)
|
||||
parentPlot->qwtPlot()->updateLegend();
|
||||
parentPlot->updateAxes();
|
||||
parentPlot->updateZoomInQwt();
|
||||
|
||||
if (m_showCurves() && m_colorMode() == BY_ENSEMBLE_PARAM)
|
||||
{
|
||||
parentPlot->qwtPlot()->addOrUpdateEnsembleCurveSetLegend(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
parentPlot->qwtPlot()->removeEnsembleCurveSetLegend(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,6 +498,8 @@ void RimEnsembleCurveSet::updateCurveColors()
|
||||
{
|
||||
RimSummaryCaseCollection* group = m_yValuesSummaryGroup();
|
||||
QString parameterName = m_ensembleParameter();
|
||||
m_legendConfig->setTitle(parameterName);
|
||||
|
||||
if (group && !parameterName.isEmpty())
|
||||
{
|
||||
double minValue = std::numeric_limits<double>::infinity();
|
||||
@ -549,7 +542,7 @@ void RimEnsembleCurveSet::updateCurveColors()
|
||||
firstAncestorOrThisOfType(plot);
|
||||
if (plot && plot->qwtPlot())
|
||||
{
|
||||
if (m_colorMode == BY_ENSEMBLE_PARAM && m_legendConfig->showLegend())
|
||||
if (isCurvesVisible() && m_colorMode == BY_ENSEMBLE_PARAM && m_legendConfig->showLegend())
|
||||
{
|
||||
plot->qwtPlot()->addOrUpdateEnsembleCurveSetLegend(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user