mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Fix "Snap start to next SC" not affecting original
This commit is contained in:
parent
3a3828c9f8
commit
f378b1a2d5
@ -15169,27 +15169,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
double nearestSceneChange = nextSceneChanges.Aggregate((x, y) => Math.Abs(x - p.StartTime.TotalSeconds) < Math.Abs(y - p.StartTime.TotalSeconds) ? x : y);
|
||||
|
||||
if (!historyAdded)
|
||||
{
|
||||
MakeHistoryForUndo(string.Format(_language.BeforeX, Configuration.Settings.Language.Settings.AdjustSnapStartToNextSceneChange));
|
||||
historyAdded = true;
|
||||
}
|
||||
|
||||
if (!withGap)
|
||||
{
|
||||
if (nearestSceneChange * 1000 < p.EndTime.TotalMilliseconds)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = nearestSceneChange * 1000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nearestSceneChange * 1000 + Configuration.Settings.General.MinimumMillisecondsBetweenLines < p.EndTime.TotalMilliseconds)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = nearestSceneChange * 1000 + Configuration.Settings.General.MinimumMillisecondsBetweenLines;
|
||||
}
|
||||
}
|
||||
|
||||
if (_subtitleAlternate != null && Configuration.Settings.General.AllowEditOfOriginalSubtitle)
|
||||
{
|
||||
var original = Utilities.GetOriginalParagraph(idx, p, _subtitleAlternate.Paragraphs);
|
||||
@ -15218,6 +15197,27 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!historyAdded)
|
||||
{
|
||||
MakeHistoryForUndo(string.Format(_language.BeforeX, Configuration.Settings.Language.Settings.AdjustSnapStartToNextSceneChange));
|
||||
historyAdded = true;
|
||||
}
|
||||
|
||||
if (!withGap)
|
||||
{
|
||||
if (nearestSceneChange * 1000 < p.EndTime.TotalMilliseconds)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = nearestSceneChange * 1000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nearestSceneChange * 1000 + Configuration.Settings.General.MinimumMillisecondsBetweenLines < p.EndTime.TotalMilliseconds)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = nearestSceneChange * 1000 + Configuration.Settings.General.MinimumMillisecondsBetweenLines;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RefreshSelectedParagraphs();
|
||||
|
Loading…
Reference in New Issue
Block a user