Skip to content

Commit

Permalink
Don't automatically generate meta and styles.
Browse files Browse the repository at this point in the history
An instance of the LineCollection class may have no need for these
instance variables, so only initialize them once collectLines is called.
  • Loading branch information
torque committed Aug 22, 2014
1 parent b359581 commit 6931979
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/LineCollection.moon
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class LineCollection

new: ( @sub, sel ) =>
@lines = { }
@generateMetaAndStyles!
@collectLines sel

generateMetaAndStyles: =>
Expand All @@ -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
Expand Down

0 comments on commit 6931979

Please sign in to comment.