Fix duplicate line in translator mode - thx OmrSi :)

Fix #4057
This commit is contained in:
Nikolaj Olsson 2020-03-21 21:21:18 +01:00
parent e7201b0fb3
commit df2cd2e7e1

View File

@ -1,4 +1,5 @@
using Nikse.SubtitleEdit.Controls;

using Nikse.SubtitleEdit.Controls;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.BluRaySup;
using Nikse.SubtitleEdit.Core.ContainerFormats;
@ -25859,10 +25860,10 @@ namespace Nikse.SubtitleEdit.Forms
if (Configuration.Settings.General.AllowEditOfOriginalSubtitle && _subtitleAlternate != null && _subtitleAlternate.Paragraphs.Count > 0)
{
var currentOriginal = Utilities.GetOriginalParagraph(firstSelectedIndex - 1, _subtitle.Paragraphs[firstSelectedIndex - 1], _subtitleAlternate.Paragraphs);
var currentOriginal = Utilities.GetOriginalParagraph(firstSelectedIndex, _subtitle.Paragraphs[firstSelectedIndex], _subtitleAlternate.Paragraphs);
if (currentOriginal != null)
{
_subtitleAlternate.Paragraphs.Insert(_subtitleAlternate.Paragraphs.IndexOf(currentOriginal) + 1, new Paragraph(newParagraph));
_subtitleAlternate.Paragraphs.Insert(_subtitleAlternate.Paragraphs.IndexOf(currentOriginal) + 1, new Paragraph(currentOriginal));
}
else
{