mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-04 13:16:56 -06:00
#2760 Ensemble Curves: Show one curve legend
This commit is contained in:
1 parent
1a0f242c0b
commit
0da7686cdb
7 files changed
+52
-28
No files matched your search
@@ -19,6 +19,7 @@
|
||||
#include "RimPlotCurve.h"
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
@@ -590,5 +591,17 @@ void RimPlotCurve::updateLegendEntryVisibilityNoPlotUpdate()
|
||||
showLegendInQwt = false;
|
||||
}
|
||||
|
||||
RimEnsembleCurveSet* ensembleCurveSet = nullptr;
|
||||
this->firstAncestorOrThisOfType(ensembleCurveSet);
|
||||
if (ensembleCurveSet)
|
||||
{
|
||||
auto firstCurve = ensembleCurveSet->firstCurve();
|
||||
if (firstCurve != this)
|
||||
{
|
||||
// Hide legend display for curves other than the first
|
||||
showLegendInQwt = false;
|
||||
}
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, showLegendInQwt);
|
||||
}
|
||||
Reference in new issue
Block a user