/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/linegraph.py

  • Committer: Gary van der Merwe
  • Date: 2007-09-24 07:51:16 UTC
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070924075116-ti3n2lljnz4hbhq5
Make it possible to set BROKEN_LINE_LENGTH = None to specify that
line are not to be broken.

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
        last_rev_index = None
155
155
        for rev_index in branch_line:
156
156
            if last_rev_index:
157
 
                if rev_index - last_rev_index > BROKEN_LINE_LENGTH:
 
157
                if BROKEN_LINE_LENGTH and \
 
158
                   rev_index - last_rev_index > BROKEN_LINE_LENGTH:
158
159
                    line_range.append(last_rev_index+1)
159
160
                    line_range.append(rev_index-1)
160
161
                else:
164
165
            last_rev_index = rev_index
165
166
        
166
167
        if parent_index:
167
 
            if parent_index - last_rev_index > BROKEN_LINE_LENGTH:
 
168
            if BROKEN_LINE_LENGTH and \
 
169
               parent_index - last_rev_index > BROKEN_LINE_LENGTH:
168
170
                line_range.append(last_rev_index+1)
169
171
            else:
170
172
                line_range.extend(range(last_rev_index+1, parent_index))
204
206
                        
205
207
                    # If this line is really long, break it.
206
208
                    if len(branch_id) > 0 and \
 
209
                       BROKEN_LINE_LENGTH and \
207
210
                       parent_index - rev_index > BROKEN_LINE_LENGTH:
208
211
                        child_line_col_index = \
209
212
                            _find_free_column(columns,