[Timeline] Ensure empty timelines don’t break removal of short entries
This commit is contained in:
parent
a4febc68d1
commit
f2db1f5b5e
@ -333,6 +333,7 @@ A slot is short if it is not longer than THRESHOLD seconds.
|
||||
Resulting gaps are distributed evenly among adjacent slots.
|
||||
THRESHOLD defaults to the value of
|
||||
`timeline-tools-short-task-threshold’ if not supplied."
|
||||
(unless (null timeline)
|
||||
(let ((start (timeline-tools-entry-start-time (-first-item timeline)))
|
||||
(end (timeline-tools-entry-end-time (-last-item timeline)))
|
||||
(threshold (or threshold timeline-tools-short-task-threshold))
|
||||
@ -363,7 +364,7 @@ THRESHOLD defaults to the value of
|
||||
(setf (timeline-tools-entry-end-time entry-1) middle)
|
||||
(setf (timeline-tools-entry-start-time entry-2) middle)))))
|
||||
|
||||
new-timeline))
|
||||
new-timeline)))
|
||||
|
||||
(defun timeline-tools-transform-timeline (timeline)
|
||||
"Return timeline from files, after application of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user