mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +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
@ -364,8 +364,20 @@ namespace Nikse.SubtitleEdit.Core.Forms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Fallback when no shot changes were apparently found: just chain them
|
// Check if there are really no shot changes in between
|
||||||
newLeftOutCueFrame = newRightInCueFrame - Configuration.Settings.BeautifyTimeCodes.Profile.Gap;
|
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
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user