mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Improve UI for "Merge text with same time codes" - thx Jamakmake :)
(Click on fix focuses fixed lines as in "Merge lines with same text")
This commit is contained in:
parent
2024b918b5
commit
2b2dbad6f4
1
src/Forms/MergeTextWithSameTimeCodes.Designer.cs
generated
1
src/Forms/MergeTextWithSameTimeCodes.Designer.cs
generated
@ -109,6 +109,7 @@
|
||||
this.listViewFixes.TabIndex = 0;
|
||||
this.listViewFixes.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewFixes.View = System.Windows.Forms.View.Details;
|
||||
this.listViewFixes.SelectedIndexChanged += new System.EventHandler(this.listViewFixes_SelectedIndexChanged);
|
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
|
@ -3,6 +3,7 @@ using Nikse.SubtitleEdit.Logic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
@ -222,5 +223,25 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
private void listViewFixes_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewFixes.SelectedIndices.Count > 0)
|
||||
{
|
||||
int index = listViewFixes.SelectedIndices[0];
|
||||
ListViewItem item = listViewFixes.Items[index];
|
||||
string[] numbers = item.SubItems[1].Text.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (string number in numbers)
|
||||
{
|
||||
foreach (Paragraph p in _subtitle.Paragraphs)
|
||||
{
|
||||
if (p.Number.ToString(CultureInfo.InvariantCulture) == number)
|
||||
{
|
||||
index = _subtitle.GetIndex(p);
|
||||
SubtitleListview1.EnsureVisible(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ namespace Nikse.SubtitleEdit.Forms.Styles
|
||||
public string NewName { get; set; }
|
||||
}
|
||||
|
||||
public List<NameEdit> RenameActions { get; set; } = new List<NameEdit>();
|
||||
private string _startName = null;
|
||||
private string _editedName = null;
|
||||
public List<NameEdit> RenameActions { get; set; }
|
||||
private string _startName;
|
||||
private string _editedName;
|
||||
private string _header;
|
||||
private bool _doUpdate;
|
||||
private string _oldSsaName;
|
||||
@ -41,6 +41,7 @@ namespace Nikse.SubtitleEdit.Forms.Styles
|
||||
InitializeComponent();
|
||||
UiUtil.FixFonts(this);
|
||||
|
||||
RenameActions = new List<NameEdit>();
|
||||
labelStatus.Text = string.Empty;
|
||||
_header = subtitle.Header;
|
||||
_format = format;
|
||||
|
Loading…
Reference in New Issue
Block a user