Index: /trunk/BNC/bncfigure.cpp
===================================================================
--- /trunk/BNC/bncfigure.cpp	(revision 1933)
+++ /trunk/BNC/bncfigure.cpp	(revision 1934)
@@ -96,13 +96,22 @@
 void bncFigure::slotNextAnimationFrame() {
   QMutexLocker locker(&_mutex);
-  if (++_counter == 10) {
-    QMapIterator<QByteArray, sumAndMean*> it(_bytes);
-    while (it.hasNext()) {
-      it.next();
-      it.value()->_mean = it.value()->_sum / _counter;
+
+  const static int MAXCOUNTER = 10;
+
+  ++_counter;
+
+  QMapIterator<QByteArray, sumAndMean*> it(_bytes);
+  while (it.hasNext()) {
+    it.next();
+    it.value()->_mean = it.value()->_sum / _counter;
+    if (_counter == MAXCOUNTER) {
       it.value()->_sum  = 0.0;
     }
+  }
+
+  if (_counter == MAXCOUNTER) {
     _counter = 0;
   }
+
   update();
   QTimer::singleShot(1000, this, SLOT(slotNextAnimationFrame()));
