From ef7abaf1b67a61bb99f8a3139eac323894912524 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 11 Oct 2010 20:06:31 +0000 Subject: [PATCH] Add new dialogue lines immediately after the last dialogue line in the file rather than at the end of the file Originally committed to SVN as r4806. --- aegisub/src/subs_grid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/subs_grid.cpp b/aegisub/src/subs_grid.cpp index 078d5cd45..e6083ce44 100644 --- a/aegisub/src/subs_grid.cpp +++ b/aegisub/src/subs_grid.cpp @@ -749,8 +749,9 @@ void SubtitlesGrid::SwapLines(int n1,int n2) { /// @param after /// @param update void SubtitlesGrid::InsertLine(AssDialogue *line,int n,bool after,bool update) { - AssDialogue *rel_line = GetDialogue(n + (after?1:0)); + AssDialogue *rel_line = GetDialogue(n); entryIter pos = std::find(ass->Line.begin(), ass->Line.end(), rel_line); + if (after) ++pos; entryIter newIter = ass->Line.insert(pos,line); BaseGrid::UpdateMaps();