mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Fix index column's width when opening a file
This commit is contained in:
parent
1b48c9bde1
commit
756a42a30b
@ -12260,7 +12260,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (SubtitleListview1.ColumnIndexNumber >= 0)
|
||||
{
|
||||
Configuration.Settings.General.ListViewNumberWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexNumber].Width;
|
||||
var fileHasBookmarkedLines = _subtitle != null && _subtitle.Paragraphs.Any(p => p.Bookmark != null);
|
||||
var columnIndexNumberWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexNumber].Width;
|
||||
Configuration.Settings.General.ListViewNumberWidth = fileHasBookmarkedLines ? columnIndexNumberWidth - 18 : columnIndexNumberWidth;
|
||||
}
|
||||
|
||||
if (SubtitleListview1.ColumnIndexStart >= 0)
|
||||
@ -23032,6 +23034,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
imageListBookmarks.Images.Add(pictureBoxBookmark.Image);
|
||||
SetListViewStateImages();
|
||||
if (_subtitle != null && _subtitle.Paragraphs.Any(p => p.Bookmark != null))
|
||||
{
|
||||
SubtitleListview1.Columns[SubtitleListview1.ColumnIndexNumber].Width = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexNumber].Width + 18;
|
||||
}
|
||||
|
||||
toolStripButtonToggleVideo.Checked = !Configuration.Settings.General.ShowVideoPlayer;
|
||||
toolStripButtonToggleVideo_Click(null, null);
|
||||
|
Loading…
Reference in New Issue
Block a user