Commit cfb887d9 authored by fred's avatar fred

Revert "grid: handle new "sonar" case"

This reverts commit 35b0e737, this is worse
than before and will be handled differently, simply by removing the other
emission.
parent 35b0e737
......@@ -447,13 +447,10 @@ class Grid(TemplateView):
# we set the cell time label to the longest
# period
grid[i][j].time_label = same_cell_below.time_label
# then we sort emissions, and if the start
# time is the same, the longest are put first
def cmp_schedule(x, y):
if x.datetime == y.datetime:
return -cmp(x.get_duration(), y.get_duration())
return cmp(x.datetime, y.datetime)
grid[i][j].schedules.sort(cmp_schedule)
# then we sort emissions so the longest are
# put first
grid[i][j].schedules.sort(
lambda x, y: -cmp(x.get_duration(), y.get_duration()))
# then we add individual time labels to the
# other schedules
for schedule in current_cell_schedules:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment