diff options
-rw-r--r-- | barchart.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/barchart.cpp b/barchart.cpp index cb794ac..34f1897 100644 --- a/barchart.cpp +++ b/barchart.cpp @@ -172,7 +172,7 @@ void BarChart::updateBars(QSGNode *node) QSGNode *barNode = newBarNode(); node->prependChildNode(barNode); } - while (numValues < root->childCount()) { + while (numValues < node->childCount()) { // NOTE: as stated in docs, QSGNode's children are stored in a // linked list. Hence, this operation should be as fast as expected node->removeChildNode(node->firstChild()); |