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.
This commit is contained in:
Thomas Goyne 2010-10-11 20:06:31 +00:00
parent aee6b0a540
commit ef7abaf1b6

View file

@ -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();