Select the right things in the select overlaps macro. Closes #1594.

This commit is contained in:
Thomas Goyne 2013-04-15 15:42:52 -07:00
parent f7f948872b
commit d85419c49a
1 changed files with 4 additions and 2 deletions

View File

@ -27,11 +27,13 @@ function select_overlaps(subs)
for i = 1,#subs do
local line = subs[i]
if line.class == "dialogue" then
line.i = i - 1
line.i = i
table.insert(dialogue, line)
end
end
table.sort(dialogue, function(a,b) return a.start_time < b.start_time end)
table.sort(dialogue, function(a,b)
return a.start_time < b.start_time or (a.start_time == b.start_time and a.i < b.i)
end)
local end_time = 0
local overlaps = {}