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: if not partitions:
return return
finished = False
while tree_iter: while tree_iter:
y -= 1 y -= 1
if y == 0: if y == 0:
y = YIELD_LIMIT y = YIELD_LIMIT
yield True yield True
level = model_get (tree_iter, id_level) level = model_get (tree_iter, id_level)
if i > partitions[partitions_i]: while i > partitions[partitions_i]:
data.append (tuple (counts)) data.append (tuple (counts))
counts = [0] * 6 counts = [0] * 6
partitions_i += 1 partitions_i += 1
if partitions_i == len (partitions): if partitions_i == len (partitions):
# FIXME? finished = True
break break
i += 1 if finished:
break
counts[level] += 1 counts[level] += 1
i += 1
tree_iter = model_next (tree_iter) tree_iter = model_next (tree_iter)
# Now handle the last one: # Now handle the last one: