mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Merge pull request #1703 from ivandrofly/bf-se-tb
[SE-Textbox] - Bugfixed: Do not autobreak when Unbreak button is clicked.
This commit is contained in:
commit
5fb9c502dc
@ -210,6 +210,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private bool _splitDualSami;
|
||||
private bool _openFileDialogOn;
|
||||
private bool _resetVideo = true;
|
||||
private bool _doAutoBreakOnTextChanged = true;
|
||||
private static object _syncUndo = new object();
|
||||
private string[] _dragAndDropFiles;
|
||||
private Timer _dragAndDropTimer = new Timer(); // to prevent locking windows explorer
|
||||
@ -6859,7 +6860,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (_subtitleListViewIndex >= 0)
|
||||
{
|
||||
int numberOfNewLines = Utilities.GetNumberOfLines(textBoxListViewText.Text);
|
||||
UiUtil.CheckAutoWrap(textBoxListViewText, new KeyEventArgs(Keys.None), numberOfNewLines);
|
||||
if (_doAutoBreakOnTextChanged)
|
||||
UiUtil.CheckAutoWrap(textBoxListViewText, new KeyEventArgs(Keys.None), numberOfNewLines);
|
||||
|
||||
// update _subtitle + listview
|
||||
string text = textBoxListViewText.Text.TrimEnd();
|
||||
@ -8420,6 +8422,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void ButtonUnBreakClick(object sender, EventArgs e)
|
||||
{
|
||||
// Disable Autobreak feature.
|
||||
_doAutoBreakOnTextChanged = false;
|
||||
if (SubtitleListview1.SelectedItems.Count > 1)
|
||||
{
|
||||
MakeHistoryForUndo(_language.BeforeRemoveLineBreaksInSelectedLines);
|
||||
@ -8438,6 +8442,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
textBoxListViewText.Text = Utilities.UnbreakLine(textBoxListViewText.Text);
|
||||
}
|
||||
// Enable Autobreak feature.
|
||||
_doAutoBreakOnTextChanged = true;
|
||||
}
|
||||
|
||||
private void TabControlSubtitleSelectedIndexChanged(object sender, EventArgs e)
|
||||
@ -9141,7 +9147,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pes != null && pes.PageCompositions != null && pes.PageCompositions.Any(p=>p.Regions.Count > 0))
|
||||
if (pes != null && pes.PageCompositions != null && pes.PageCompositions.Any(p => p.Regions.Count > 0))
|
||||
{
|
||||
subtitleImages.Add(pes);
|
||||
subtitle.Paragraphs.Add(new Paragraph(string.Empty, msub.Start, msub.End));
|
||||
|
Loading…
Reference in New Issue
Block a user