Fix Hide Non-curves on legend

.. trend, outliers, bests all failed to hide.
This commit is contained in:
Mark Liversedge
2015-07-28 15:19:54 +01:00
parent 5fc0a96195
commit 4e7cbcd246

View File

@@ -1273,7 +1273,7 @@ LTMPlot::setData(LTMSettings *set)
p.next();
// always hide bollocksy curves
if (p.key().endsWith(tr("trend")) || p.key().endsWith(tr("Outliers")) || p.key().endsWith(tr("Best")) || p.key().startsWith(tr("Best")))
if (p.key().contains("_trend") || p.key().contains("_outliers") || p.key().contains(tr("Best")))
p.value()->setItemAttribute(QwtPlotItem::Legend, false);
else
p.value()->setItemAttribute(QwtPlotItem::Legend, settings->legend);
@@ -2380,7 +2380,7 @@ LTMPlot::setCompareData(LTMSettings *set)
p.next();
// always hide bollocksy curves
if (p.key().endsWith(tr("trend")) || p.key().endsWith(tr("Outliers")) || p.key().endsWith(tr("Best")) || p.key().startsWith(tr("Best")))
if (p.key().contains("_trend") || p.key().contains("_outliers") || p.key().contains(tr("Best")))
p.value()->setItemAttribute(QwtPlotItem::Legend, false);
else
p.value()->setItemAttribute(QwtPlotItem::Legend, settings->legend);