From 6931979a40082223167d14650d544df010fa3c1e Mon Sep 17 00:00:00 2001 From: torque Date: Wed, 23 Jul 2014 03:09:04 -0700 Subject: [PATCH] Don't automatically generate meta and styles. An instance of the LineCollection class may have no need for these instance variables, so only initialize them once collectLines is called. --- src/LineCollection.moon | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LineCollection.moon b/src/LineCollection.moon index 87a10a5..1fe5c02 100644 --- a/src/LineCollection.moon +++ b/src/LineCollection.moon @@ -5,7 +5,6 @@ class LineCollection new: ( @sub, sel ) => @lines = { } - @generateMetaAndStyles! @collectLines sel generateMetaAndStyles: => @@ -22,6 +21,9 @@ class LineCollection @meta[line.key] = line.value collectLines: ( sel ) => + unless @meta and @styles + @generateMetaAndStyles! + dialogueStart = 0 frame_from_ms = aegisub.frame_from_ms ms_from_frame = aegisub.ms_from_frame