mirror of https://github.com/odrling/Aegisub
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:
parent
aee6b0a540
commit
ef7abaf1b6
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue