mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Working on no-break-after list
This commit is contained in:
parent
52700a1d82
commit
cbe7bfaaf6
1
src/Forms/DoNotBreakAfterListEdit.Designer.cs
generated
1
src/Forms/DoNotBreakAfterListEdit.Designer.cs
generated
@ -115,6 +115,7 @@
|
||||
this.textBoxNoBreakAfter.Name = "textBoxNoBreakAfter";
|
||||
this.textBoxNoBreakAfter.Size = new System.Drawing.Size(218, 20);
|
||||
this.textBoxNoBreakAfter.TabIndex = 24;
|
||||
this.textBoxNoBreakAfter.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxNoBreakAfter_KeyDown);
|
||||
//
|
||||
// buttonAddNoBreakAfter
|
||||
//
|
||||
|
@ -101,6 +101,7 @@ namespace Nikse.SubtitleEdit
|
||||
{
|
||||
listBoxNoBreakAfter.SelectedIndex = first;
|
||||
}
|
||||
comboBoxDictionaries.Enabled = false;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, System.EventArgs e)
|
||||
@ -155,6 +156,17 @@ namespace Nikse.SubtitleEdit
|
||||
}
|
||||
}
|
||||
_noBreakAfterList.Add(item);
|
||||
comboBoxDictionaries.Enabled = false;
|
||||
ShowBreakAfterList(_noBreakAfterList);
|
||||
for (int i = 0; i < listBoxNoBreakAfter.Items.Count; i++ )
|
||||
{
|
||||
if (listBoxNoBreakAfter.Items[i].ToString() == item.Text)
|
||||
{
|
||||
listBoxNoBreakAfter.SelectedIndex = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
textBoxNoBreakAfter.Text = string.Empty;
|
||||
}
|
||||
|
||||
private void RadioButtonCheckedChanged(object sender, EventArgs e)
|
||||
@ -185,5 +197,11 @@ namespace Nikse.SubtitleEdit
|
||||
}
|
||||
}
|
||||
|
||||
private void textBoxNoBreakAfter_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
buttonAddNamesEtc_Click(sender, e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -358,12 +358,10 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
string s2 = s.Substring(0, index);
|
||||
if (Configuration.Settings.Tools.UseNoLineBreakAfter)
|
||||
{
|
||||
|
||||
foreach (NoBreakAfterItem ending in NoBreakAfterList(language))
|
||||
{
|
||||
if (ending.IsMatch(s2))
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user