Fix CPU load chart update

This commit is contained in:
Joanna Rutkowska 2010-05-12 16:18:38 +02:00
parent c1b81d3ab6
commit 233ef2a63f

View File

@ -168,8 +168,11 @@ class LoadChartWidget (QWidget):
H = self.height() - 5 H = self.height() - 5
N = len(self.load_history) N = len(self.load_history)
if N > W/dx: if N > W/dx:
tail = N - W/dx
N = W/dx N = W/dx
self.load_history.pop(0) self.load_history = self.load_history[tail:]
assert len(self.load_history) == N
for i in range (0, N-1): for i in range (0, N-1):
val = self.load_history[N- i - 1] val = self.load_history[N- i - 1]