From 543e72abf700bf6fd2b82f4b2dfed1a6cf483130 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 24 May 2020 10:03:51 +0200 Subject: [PATCH] Remove too complicated setting --- libse/Settings.cs | 11 +---------- src/Forms/Ocr/OCRSpellCheck.cs | 2 +- src/Forms/Ocr/VobSubOcrCharacter.cs | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/libse/Settings.cs b/libse/Settings.cs index cdf7b6b31..21cc456dd 100644 --- a/libse/Settings.cs +++ b/libse/Settings.cs @@ -1400,7 +1400,6 @@ $HorzAlign = Center public bool CaptureTopAlign { get; set; } public int UnfocusedAttentionBlinkCount { get; set; } public int UnfocusedAttentionPlaySoundCount { get; set; } - public int UnfocusedAttentionPlaySoundEvery { get; set; } public VobSubOcrSettings() { @@ -1426,8 +1425,7 @@ $HorzAlign = Center BinaryAutoDetectBestDb = true; CaptureTopAlign = false; UnfocusedAttentionBlinkCount = 50; - UnfocusedAttentionPlaySoundCount = 2; - UnfocusedAttentionPlaySoundEvery = 2; + UnfocusedAttentionPlaySoundCount = 1; } } @@ -5313,12 +5311,6 @@ $HorzAlign = Center settings.VobSubOcr.UnfocusedAttentionPlaySoundCount = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture); } - subNode = node.SelectSingleNode("UnfocusedAttentionPlaySoundEvery"); - if (subNode != null) - { - settings.VobSubOcr.UnfocusedAttentionPlaySoundEvery = Convert.ToInt32(subNode.InnerText, CultureInfo.InvariantCulture); - } - foreach (XmlNode groupNode in doc.DocumentElement.SelectNodes("MultipleSearchAndReplaceGroups/Group")) { var group = new MultipleSearchAndReplaceGroup(); @@ -7496,7 +7488,6 @@ $HorzAlign = Center textWriter.WriteElementString("CaptureTopAlign", settings.VobSubOcr.CaptureTopAlign.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("UnfocusedAttentionBlinkCount", settings.VobSubOcr.UnfocusedAttentionBlinkCount.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("UnfocusedAttentionPlaySoundCount", settings.VobSubOcr.UnfocusedAttentionPlaySoundCount.ToString(CultureInfo.InvariantCulture)); - textWriter.WriteElementString("UnfocusedAttentionPlaySoundEvery", settings.VobSubOcr.UnfocusedAttentionPlaySoundEvery.ToString(CultureInfo.InvariantCulture)); textWriter.WriteEndElement(); diff --git a/src/Forms/Ocr/OCRSpellCheck.cs b/src/Forms/Ocr/OCRSpellCheck.cs index cf2681c50..c336c4e1a 100644 --- a/src/Forms/Ocr/OCRSpellCheck.cs +++ b/src/Forms/Ocr/OCRSpellCheck.cs @@ -369,7 +369,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr _blinkForm, Configuration.Settings.VobSubOcr.UnfocusedAttentionBlinkCount, Configuration.Settings.VobSubOcr.UnfocusedAttentionPlaySoundCount, - Configuration.Settings.VobSubOcr.UnfocusedAttentionPlaySoundEvery); + 2); } } diff --git a/src/Forms/Ocr/VobSubOcrCharacter.cs b/src/Forms/Ocr/VobSubOcrCharacter.cs index 6e8ddff70..2e02e6442 100644 --- a/src/Forms/Ocr/VobSubOcrCharacter.cs +++ b/src/Forms/Ocr/VobSubOcrCharacter.cs @@ -262,7 +262,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr _vobSubForm, Configuration.Settings.VobSubOcr.UnfocusedAttentionBlinkCount, Configuration.Settings.VobSubOcr.UnfocusedAttentionPlaySoundCount, - Configuration.Settings.VobSubOcr.UnfocusedAttentionPlaySoundEvery); + 2); } }