src/cm/utils/comment_positioning.py
changeset 497 b478eb3f1a0d
parent 496 c3df46754007
child 498 31d3fbe0c9a2
equal deleted inserted replaced
496:c3df46754007 497:b478eb3f1a0d
    66         if cc.valid:
    66         if cc.valid:
    67             for id in xrange(len(span_starts_new.keys())):
    67             for id in xrange(len(span_starts_new.keys())):
    68                 if (span_starts_new.get(id)):
    68                 if (span_starts_new.get(id)):
    69                 start = span_starts_new.get(id, 0)
    69                 start = span_starts_new.get(id, 0)
    70                 end = span_starts_new.get(id+1, sys.maxint)
    70                 end = span_starts_new.get(id+1, sys.maxint)
    71                 if (not(start) and cc.computed_start_offset >= start and cc.computed_start_offset < end):
       
    72 
    71 
    73                 # adjust start                
    72                 # adjust start                
    74                 if cc.computed_start_offset >= start and cc.computed_start_offset < end:
    73                 if cc.computed_start_offset >= start and cc.computed_start_offset < end:
    75                     cc.start_wrapper = id
    74                     cc.start_wrapper = id
    76                     cc.start_offset = cc.computed_start_offset - start
    75                     cc.start_offset = cc.computed_start_offset - start