mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fix MergeLinesShorterThan
saving/loading - thx uckthis/OmrSi :)
Fix #5132
This commit is contained in:
parent
efaf8dcfc8
commit
5fc6f3cb03
@ -900,7 +900,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
||||
|
||||
if (gs.MergeLinesShorterThan >= 1 && gs.MergeLinesShorterThan < comboBoxMergeShortLineLength.Items.Count)
|
||||
{
|
||||
comboBoxMergeShortLineLength.SelectedIndex = gs.MergeLinesShorterThan;
|
||||
comboBoxMergeShortLineLength.SelectedIndex = gs.MergeLinesShorterThan - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1964,7 +1964,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
||||
toolsSettings.VerifyPlaySeconds = comboBoxToolsVerifySeconds.SelectedIndex + 2;
|
||||
toolsSettings.StartSceneIndex = comboBoxToolsStartSceneIndex.SelectedIndex;
|
||||
toolsSettings.EndSceneIndex = comboBoxToolsEndSceneIndex.SelectedIndex;
|
||||
gs.MergeLinesShorterThan = comboBoxMergeShortLineLength.SelectedIndex;
|
||||
gs.MergeLinesShorterThan = comboBoxMergeShortLineLength.SelectedIndex + 1;
|
||||
if (gs.MergeLinesShorterThan > gs.SubtitleLineMaximumLength + 1)
|
||||
{
|
||||
gs.MergeLinesShorterThan = gs.SubtitleLineMaximumLength;
|
||||
@ -3354,7 +3354,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
||||
|
||||
if (profile.MergeLinesShorterThan >= 1 && profile.MergeLinesShorterThan < comboBoxMergeShortLineLength.Items.Count)
|
||||
{
|
||||
comboBoxMergeShortLineLength.SelectedIndex = profile.MergeLinesShorterThan;
|
||||
comboBoxMergeShortLineLength.SelectedIndex = profile.MergeLinesShorterThan - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
||||
|
||||
comboBoxMergeShortLineLength.BeginUpdate();
|
||||
comboBoxMergeShortLineLength.Items.Clear();
|
||||
for (int i = 10; i < 100; i++)
|
||||
for (int i = 1; i < 100; i++)
|
||||
{
|
||||
comboBoxMergeShortLineLength.Items.Add(i.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
@ -204,7 +204,7 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
||||
RulesProfiles[idx].MaxNumberOfLines = (int)numericUpDownMaxNumberOfLines.Value;
|
||||
RulesProfiles[idx].SubtitleMaximumWordsPerMinute = (int)numericUpDownMaxWordsMin.Value;
|
||||
RulesProfiles[idx].CpsIncludesSpace = checkBoxCpsIncludeWhiteSpace.Checked;
|
||||
RulesProfiles[idx].MergeLinesShorterThan = comboBoxMergeShortLineLength.SelectedIndex + 10;
|
||||
RulesProfiles[idx].MergeLinesShorterThan = comboBoxMergeShortLineLength.SelectedIndex + 1;
|
||||
RulesProfiles[idx].DialogStyle = DialogSplitMerge.GetDialogStyleFromIndex(comboBoxDialogStyle.SelectedIndex);
|
||||
RulesProfiles[idx].ContinuationStyle = ContinuationUtilities.GetContinuationStyleFromIndex(comboBoxContinuationStyle.SelectedIndex);
|
||||
UpdateRulesProfilesLine(idx);
|
||||
@ -262,9 +262,9 @@ namespace Nikse.SubtitleEdit.Forms.Options
|
||||
numericUpDownMaxWordsMin.Value = p.SubtitleMaximumWordsPerMinute;
|
||||
}
|
||||
checkBoxCpsIncludeWhiteSpace.Checked = RulesProfiles[idx].CpsIncludesSpace;
|
||||
if (RulesProfiles[idx].MergeLinesShorterThan >= 10 && RulesProfiles[idx].MergeLinesShorterThan - 10 < comboBoxMergeShortLineLength.Items.Count)
|
||||
if (RulesProfiles[idx].MergeLinesShorterThan >= 1 && RulesProfiles[idx].MergeLinesShorterThan - 1 < comboBoxMergeShortLineLength.Items.Count)
|
||||
{
|
||||
comboBoxMergeShortLineLength.SelectedIndex = RulesProfiles[idx].MergeLinesShorterThan - 10;
|
||||
comboBoxMergeShortLineLength.SelectedIndex = RulesProfiles[idx].MergeLinesShorterThan - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user