Fix timeline level distribution plotting after gaps

This commit is contained in:
René Stadler 2007-11-30 14:05:18 +02:00 committed by Stefan Sauer
parent 99c871ba4a
commit 5b41b6e861

View file

@ -166,22 +166,25 @@ class LevelDistributionSentinel (object):
if not partitions:
return
finished = False
while tree_iter:
y -= 1
if y == 0:
y = YIELD_LIMIT
yield True
level = model_get (tree_iter, id_level)
if i > partitions[partitions_i]:
while i > partitions[partitions_i]:
data.append (tuple (counts))
counts = [0] * 6
partitions_i += 1
if partitions_i == len (partitions):
# FIXME?
finished = True
break
i += 1
if finished:
break
counts[level] += 1
i += 1
tree_iter = model_next (tree_iter)
# Now handle the last one: