mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 20:22:41 +01:00
Merge pull request #8936 from Flitskikker/feature/btc-improvement-20241021
Another small Beautify time codes improvement
This commit is contained in:
commit
9b41308c5a
@ -363,11 +363,23 @@ namespace Nikse.SubtitleEdit.Core.Forms
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if there are really no shot changes in between
|
||||
var firstShotChangeInBetween = GetFirstShotChangeFrameInBetween(bestLeftOutCueFrameInfo.cueFrame, bestRightInCueFrameInfo.cueFrame);
|
||||
var lastShotChangeInBetween = GetLastShotChangeFrameInBetween(bestLeftOutCueFrameInfo.cueFrame, bestRightInCueFrameInfo.cueFrame);
|
||||
|
||||
if (firstShotChangeInBetween != null || lastShotChangeInBetween != null)
|
||||
{
|
||||
// There are, so snap to the one that is closest to either of the two cues
|
||||
AlignCuesAroundClosestShotChange(firstShotChangeInBetween ?? int.MinValue, lastShotChangeInBetween ?? int.MaxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback when no shot changes were apparently found: just chain them
|
||||
newLeftOutCueFrame = newRightInCueFrame - Configuration.Settings.BeautifyTimeCodes.Profile.Gap;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Just chain them
|
||||
|
Loading…
Reference in New Issue
Block a user