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