##// END OF EJS Templates
Use empty rect for gl series instead of small dummy rect...
Miikka Heikkinen -
r2830:1757b2dc576a
parent child
Show More
@@ -70,12 +70,11 QPainterPath LineChartItem::shape() const
70
70
71 void LineChartItem::updateGeometry()
71 void LineChartItem::updateGeometry()
72 {
72 {
73 static const QRectF dummyRect = QRectF(0.0, 0.0, 0.001, 0.001);
74 if (m_series->useOpenGL()) {
73 if (m_series->useOpenGL()) {
75 // Fake a miniscule region, so we trigger changed signal.
74 if (!m_rect.isEmpty()) {
76 if (m_rect.width() != dummyRect.width()) {
77 prepareGeometryChange();
75 prepareGeometryChange();
78 m_rect = dummyRect;
76 // Changed signal seems to trigger even with empty region
77 m_rect = QRectF();
79 }
78 }
80 update();
79 update();
81 return;
80 return;
@@ -130,14 +130,13 void ScatterChartItem::markerDoubleClicked(QGraphicsItem *marker)
130
130
131 void ScatterChartItem::updateGeometry()
131 void ScatterChartItem::updateGeometry()
132 {
132 {
133 static const QRectF dummyRect = QRectF(0.0, 0.0, 0.001, 0.001);
134 if (m_series->useOpenGL()) {
133 if (m_series->useOpenGL()) {
135 if (m_items.childItems().count())
134 if (m_items.childItems().count())
136 deletePoints(m_items.childItems().count());
135 deletePoints(m_items.childItems().count());
137 // Fake a miniscule region, so we trigger changed signal.
136 if (!m_rect.isEmpty()) {
138 if (m_rect.width() != dummyRect.width()) {
139 prepareGeometryChange();
137 prepareGeometryChange();
140 m_rect = dummyRect;
138 // Changed signal seems to trigger even with empty region
139 m_rect = QRectF();
141 }
140 }
142 update();
141 update();
143 return;
142 return;
General Comments 0
You need to be logged in to leave comments. Login now