Fix selecting, fix drag&drop

This commit is contained in:
Martijn van Berkel (Flitskikker) 2024-02-10 11:58:51 +01:00
parent a669dec3cf
commit fb2781909e
2 changed files with 6 additions and 4 deletions

View File

@ -22026,15 +22026,14 @@ namespace Nikse.SubtitleEdit.Forms
private void GoToTimeAndSelectPrecedingParagraph(double timeSeconds)
{
var index = 0;
// Select correct paragraph
var index = _subtitle.Paragraphs.Count - 1;
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
{
if (_subtitle.Paragraphs[i].EndTime.TotalSeconds > timeSeconds)
{
index = i - 1;
SelectListViewIndexAndEnsureVisible(index);
index = i - 1;
break;
}
}
@ -22044,6 +22043,8 @@ namespace Nikse.SubtitleEdit.Forms
index = 0;
}
SelectListViewIndexAndEnsureVisible(index);
// Seek in waveform
if (mediaPlayer.VideoPlayer is null)
{

View File

@ -166,6 +166,7 @@
// subtitleListView
//
this.subtitleListView.AllowColumnReorder = true;
this.subtitleListView.AllowDrop = true;
this.subtitleListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));