diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-11 14:05:18 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-11 14:05:27 +0100 |
commit | 3e02b15bee53a2e215bb312fb0e7c77a03828cd2 (patch) | |
tree | 853debb6b146ca9f56e8e310e6f5c22b619f3267 | |
parent | 2a94896294fb664b9dc98051332d5a43a982d925 (diff) |
Scatterplot: Glyph update method now gets the glyphs' root.
-rw-r--r-- | scatterplot.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scatterplot.cpp b/scatterplot.cpp index 7505e88..1be52eb 100644 --- a/scatterplot.cpp +++ b/scatterplot.cpp @@ -124,7 +124,6 @@ QSGNode *Scatterplot::newSplatNode() tex->setValues(m_colorData); tex->setColormap(m_colorScale); tex->updateTexture(); - window()->resetOpenGLState(); return node; @@ -213,7 +212,7 @@ QSGNode *Scatterplot::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) updateSplat(node); node = node->nextSibling(); - updateGlyphs(node->firstChild()); + updateGlyphs(node); node = node->nextSibling(); // Change update hints to false; the splat and glyphs were just updated @@ -268,9 +267,8 @@ void Scatterplot::updateSplat(QSGNode *node) } } -void Scatterplot::updateGlyphs(QSGNode *node) +void Scatterplot::updateGlyphs(QSGNode *glyphsNode) { - qreal x, y, tx, ty, moveTranslationF; if (m_currentInteractionState == INTERACTION_MOVING) { @@ -283,6 +281,7 @@ void Scatterplot::updateGlyphs(QSGNode *node) m_sx.setRange(PADDING, width() - PADDING); m_sy.setRange(height() - PADDING, PADDING); + QSGNode *node = glyphsNode->firstChild(); float t = m_animationEasing.valueForProgress(m_t); for (arma::uword i = 0; i < m_xy.n_rows; i++) { const arma::rowvec &oldRow = m_oldXY.row(i); |