##// END OF EJS Templates
Fix ChartView visibility change drawing...
Titta Heikkala -
r2605:23dc25e6ce18
parent child
Show More
@@ -46,6 +46,7 void AbstractChartLayout::setGeometry(const QRectF &rect)
46 if (!rect.isValid())
46 if (!rect.isValid())
47 return;
47 return;
48
48
49 if (m_presenter->chart()->isVisible()) {
49 QList<ChartAxisElement *> axes = m_presenter->axisItems();
50 QList<ChartAxisElement *> axes = m_presenter->axisItems();
50 ChartTitle *title = m_presenter->titleElement();
51 ChartTitle *title = m_presenter->titleElement();
51 QLegend *legend = m_presenter->legend();
52 QLegend *legend = m_presenter->legend();
@@ -68,6 +69,7 void AbstractChartLayout::setGeometry(const QRectF &rect)
68 static_cast<QGraphicsRectItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
69 static_cast<QGraphicsRectItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
69 else
70 else
70 static_cast<QGraphicsEllipseItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
71 static_cast<QGraphicsEllipseItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
72 }
71
73
72 QGraphicsLayout::setGeometry(rect);
74 QGraphicsLayout::setGeometry(rect);
73 }
75 }
@@ -518,6 +518,8 void QLegendPrivate::handleSeriesVisibleChanged()
518 marker->setVisible(series->isVisible());
518 marker->setVisible(series->isVisible());
519 }
519 }
520 }
520 }
521
522 if (m_chart->isVisible())
521 m_layout->invalidate();
523 m_layout->invalidate();
522 }
524 }
523
525
General Comments 0
You need to be logged in to leave comments. Login now