mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 10:42:35 +01:00
Work on #8204
This commit is contained in:
parent
c2120b6797
commit
d70939e50b
@ -1140,7 +1140,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
deleteParagraphToolStripMenuItem.Visible = true;
|
||||
toolStripMenuItemFocusTextbox.Visible = true;
|
||||
splitToolStripMenuItem1.Visible = true;
|
||||
runWhiperOnParagraphToolStripMenuItem.Visible = e.Paragraph.DurationTotalMilliseconds > 8000;
|
||||
runWhiperOnParagraphToolStripMenuItem.Visible = true;
|
||||
mergeWithPreviousToolStripMenuItem.Visible = true;
|
||||
mergeWithNextToolStripMenuItem.Visible = true;
|
||||
toolStripSeparator11.Visible = true;
|
||||
@ -1242,6 +1242,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
extendToPreviousToolStripMenuItem.Visible = false;
|
||||
extendToNextToolStripMenuItem.Visible = false;
|
||||
toolStripSeparator6.Visible = false;
|
||||
runWhiperOnParagraphToolStripMenuItem.Visible = false;
|
||||
|
||||
addShotChangeToolStripMenuItem.Visible = false;
|
||||
var shotChangeCount = audioVisualizer.ShotChanges?.Count(p => p >= e.Paragraph.StartTime.TotalSeconds && p <= e.Paragraph.EndTime.TotalSeconds);
|
||||
@ -9880,6 +9881,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (useOriginal)
|
||||
{
|
||||
_subtitleOriginal.InsertParagraphInCorrectTimeOrder(p);
|
||||
if (_subtitle.Paragraphs.Any(x =>
|
||||
(p.StartTime.TotalMilliseconds > x.StartTime.TotalMilliseconds && p.StartTime.TotalMilliseconds < x.EndTime.TotalMilliseconds) ||
|
||||
(p.EndTime.TotalMilliseconds > x.EndTime.TotalMilliseconds && p.EndTime.TotalMilliseconds < x.EndTime.TotalMilliseconds)))
|
||||
{
|
||||
// overlap
|
||||
}
|
||||
else
|
||||
{
|
||||
var p2 = new Paragraph(p);
|
||||
p2.Text = string.Empty;
|
||||
_subtitle.InsertParagraphInCorrectTimeOrder(p2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user