Adjust shortcut "Set current end + next start time, and go to next" now uses "Minimum milliseconds between lines" (like insert after)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1765 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-03-27 06:03:25 +00:00
parent 48f6da9da9
commit e9b476e0fa

View File

@ -14980,10 +14980,14 @@ namespace Nikse.SubtitleEdit.Forms
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds + 0.001);
if (next != null)
{
int addMilliseconds = Configuration.Settings.General.MininumMillisecondsBetweenLines;
if (addMilliseconds < 1 || addMilliseconds > 500)
addMilliseconds = 1;
var oldDuration = next.Duration.TotalMilliseconds;
if (next.StartTime.IsMaxTime || next.EndTime.IsMaxTime)
oldDuration = Utilities.GetOptimalDisplayMilliseconds(p.Text);
next.StartTime.TotalMilliseconds = p.EndTime.TotalMilliseconds + 1;
next.StartTime.TotalMilliseconds = p.EndTime.TotalMilliseconds + addMilliseconds;
next.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds + oldDuration;
SubtitleListview1.SelectIndexAndEnsureVisible(index + 1);
}