mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
parent
8990169dd8
commit
bdd19fa34e
@ -12820,8 +12820,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void MergeSelectedLines(BreakMode breakMode = BreakMode.Normal)
|
||||
{
|
||||
if (_subtitle.Paragraphs.Count > 0 && SubtitleListview1.SelectedItems.Count > 1)
|
||||
if (_subtitle.Paragraphs.Count <= 0 || SubtitleListview1.SelectedItems.Count <= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
var deleteIndices = new List<int>();
|
||||
bool first = true;
|
||||
@ -12887,7 +12890,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
MakeHistoryForUndo(_language.BeforeMergeLines);
|
||||
|
||||
var currentParagraph = _subtitle.Paragraphs[firstIndex];
|
||||
string text = sb.ToString();
|
||||
string text = sb.ToString().TrimEnd();
|
||||
text = HtmlUtil.FixInvalidItalicTags(text);
|
||||
text = FixAssaTagsAfterMerge(text);
|
||||
text = ChangeAllLinesTagsToSingleTag(text, "i");
|
||||
@ -13008,7 +13011,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SubtitleListview1.SelectedIndexChanged += SubtitleListview1_SelectedIndexChanged;
|
||||
RefreshSelectedParagraph();
|
||||
}
|
||||
}
|
||||
|
||||
private void ExtendBeforeToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
@ -31472,7 +31474,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
|
||||
string newText = p.Text.TrimEnd();
|
||||
string oldText = _listViewTextUndoLast;
|
||||
string oldText = _listViewTextUndoLast.TrimEnd();
|
||||
if (oldText == null)
|
||||
{
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user