@@ -549,7 +549,7 QString ChartPresenter::numberToString(int value) | |||||
549 | return QString::number(value); |
|
549 | return QString::number(value); | |
550 | } |
|
550 | } | |
551 |
|
551 | |||
552 |
void ChartPresenter:: |
|
552 | void ChartPresenter::updateGLWidget() | |
553 | { |
|
553 | { | |
554 | #ifndef QT_NO_OPENGL |
|
554 | #ifndef QT_NO_OPENGL | |
555 | // GLWidget pointer is wrapped in QPointer as its parent is not in our control, and therefore |
|
555 | // GLWidget pointer is wrapped in QPointer as its parent is not in our control, and therefore | |
@@ -566,6 +566,9 void ChartPresenter::ensureGLWidget() | |||||
566 | m_glWidget->show(); |
|
566 | m_glWidget->show(); | |
567 | } |
|
567 | } | |
568 | } |
|
568 | } | |
|
569 | // Make sure we update the widget in a timely manner | |||
|
570 | if (!m_glWidget.isNull()) | |||
|
571 | m_glWidget->update(); | |||
569 | #endif |
|
572 | #endif | |
570 | } |
|
573 | } | |
571 |
|
574 |
@@ -166,7 +166,7 public: | |||||
166 | QString numberToString(double value, char f = 'g', int prec = 6); |
|
166 | QString numberToString(double value, char f = 'g', int prec = 6); | |
167 | QString numberToString(int value); |
|
167 | QString numberToString(int value); | |
168 |
|
168 | |||
169 |
void |
|
169 | void updateGLWidget(); | |
170 | void glSetUseWidget(bool enable) { m_glUseWidget = enable; } |
|
170 | void glSetUseWidget(bool enable) { m_glUseWidget = enable; } | |
171 |
|
171 | |||
172 | private: |
|
172 | private: |
@@ -113,8 +113,8 void XYChart::updateChart(QVector<QPointF> &oldPoints, QVector<QPointF> &newPoin | |||||
113 |
|
113 | |||
114 | void XYChart::updateGlChart() |
|
114 | void XYChart::updateGlChart() | |
115 | { |
|
115 | { | |
116 | presenter()->ensureGLWidget(); |
|
|||
117 | dataSet()->glXYSeriesDataManager()->setPoints(m_series, domain()); |
|
116 | dataSet()->glXYSeriesDataManager()->setPoints(m_series, domain()); | |
|
117 | presenter()->updateGLWidget(); | |||
118 | updateGeometry(); |
|
118 | updateGeometry(); | |
119 | } |
|
119 | } | |
120 |
|
120 |
General Comments 0
You need to be logged in to leave comments.
Login now