mirror of https://github.com/odrling/Aegisub
Fix bug with $x/$lx/$sx and others definition time.
Originally committed to SVN as r2411.
This commit is contained in:
parent
7720092e79
commit
904ef6b07e
|
@ -435,7 +435,18 @@ function apply_line(meta, styles, subs, line, templates, tenv)
|
||||||
ly = math.floor(line.y+0.5)
|
ly = math.floor(line.y+0.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Specific for whole-line processing
|
tenv.orgline = line
|
||||||
|
tenv.line = nil
|
||||||
|
tenv.syl = nil
|
||||||
|
tenv.basesyl = nil
|
||||||
|
|
||||||
|
-- Apply all line templates
|
||||||
|
aegisub.debug.out(5, "Running line templates\n")
|
||||||
|
for t in matching_templates(templates.line, line, tenv) do
|
||||||
|
tenv.j = 0
|
||||||
|
tenv.maxj = t.loops
|
||||||
|
|
||||||
|
-- Set varctx for per-line variables
|
||||||
varctx["start"] = varctx.lstart
|
varctx["start"] = varctx.lstart
|
||||||
varctx["end"] = varctx.lend
|
varctx["end"] = varctx.lend
|
||||||
varctx.dur = varctx.ldur
|
varctx.dur = varctx.ldur
|
||||||
|
@ -453,16 +464,6 @@ function apply_line(meta, styles, subs, line, templates, tenv)
|
||||||
varctx.x = varctx.lx
|
varctx.x = varctx.lx
|
||||||
varctx.y = varctx.ly
|
varctx.y = varctx.ly
|
||||||
|
|
||||||
tenv.orgline = line
|
|
||||||
tenv.line = nil
|
|
||||||
tenv.syl = nil
|
|
||||||
tenv.basesyl = nil
|
|
||||||
|
|
||||||
-- Apply all line templates
|
|
||||||
aegisub.debug.out(5, "Running line templates\n")
|
|
||||||
for t in matching_templates(templates.line, line, tenv) do
|
|
||||||
tenv.j = 0
|
|
||||||
tenv.maxj = t.loops
|
|
||||||
while tenv.j < t.loops do
|
while tenv.j < t.loops do
|
||||||
tenv.j = tenv.j + 1
|
tenv.j = tenv.j + 1
|
||||||
if t.code then
|
if t.code then
|
||||||
|
|
Loading…
Reference in New Issue