This commit is contained in:
niksedk 2023-11-07 19:04:28 +01:00
parent 3340af204c
commit fd06ddb61c

View File

@ -18588,11 +18588,7 @@ namespace Nikse.SubtitleEdit.Forms
{
MakeHistoryForUndoOnlyIfNotRecent(string.Format(_language.VideoControls.BeforeChangingTimeInWaveformX, "#" + _subtitle.Paragraphs[index].Number + " " + _subtitle.Paragraphs[index].Text));
var newEndTime = new TimeCode(videoTimeCode.TotalMilliseconds - MinGapBetweenLines);
double charactersPerSecond = Utilities.GetCharactersPerSecond(new Paragraph(p) { EndTime = newEndTime });
if (charactersPerSecond <= Configuration.Settings.General.SubtitleMaximumCharactersPerSeconds)
{
p.EndTime = newEndTime;
}
p.EndTime = newEndTime;
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1), _subtitle.GetParagraphOrDefault(index - 1));
SetDurationInSeconds(_subtitle.Paragraphs[index].DurationTotalSeconds);