##// END OF EJS Templates
fix in legend series visibility handling
sauimone -
r1645:bb8b6398e656
parent child
Show More
@@ -461,6 +461,7 void QLegendPrivate::handleSeriesAdded(QAbstractSeries *series, Domain *domain)
461 foreach(LegendMarker* marker, markers) {
461 foreach(LegendMarker* marker, markers) {
462 marker->setFont(m_font);
462 marker->setFont(m_font);
463 marker->setLabelBrush(m_labelBrush);
463 marker->setLabelBrush(m_labelBrush);
464 marker->setVisible(series->isVisible());
464 m_items->addToGroup(marker);
465 m_items->addToGroup(marker);
465 m_markers<<marker;
466 m_markers<<marker;
466 }
467 }
@@ -520,7 +521,7 void QLegendPrivate::handleSeriesVisibleChanged()
520
521
521 foreach (LegendMarker* marker, m_markers) {
522 foreach (LegendMarker* marker, m_markers) {
522 if (marker->series() == series) {
523 if (marker->series() == series) {
523 marker->setVisible(!marker->isVisible());
524 marker->setVisible(series->isVisible());
524 }
525 }
525 }
526 }
526
527
General Comments 0
You need to be logged in to leave comments. Login now