Minor fixes

This commit is contained in:
niksedk 2021-12-03 07:44:58 +01:00
parent 6b8b554711
commit d75a16bfbd
2 changed files with 25 additions and 6 deletions

View File

@ -56,9 +56,27 @@ namespace Nikse.SubtitleEdit.Forms
labelPreview1.Text = FontName;
labelPreview2.Text = FontName;
labelPreview3.Text = FontName;
labelPreview1.Font = new Font(new FontFamily(FontName), labelPreview1.Font.Size);
labelPreview2.Font = new Font(new FontFamily(FontName), labelPreview2.Font.Size);
labelPreview3.Font = new Font(new FontFamily(FontName), labelPreview3.Font.Size);
try
{
labelPreview1.Font = new Font(new FontFamily(FontName), labelPreview1.Font.Size);
labelPreview2.Font = new Font(new FontFamily(FontName), labelPreview2.Font.Size);
labelPreview3.Font = new Font(new FontFamily(FontName), labelPreview3.Font.Size);
}
catch
{
try
{
labelPreview1.Font = new Font(new FontFamily(FontName), labelPreview1.Font.Size, FontStyle.Bold);
labelPreview2.Font = new Font(new FontFamily(FontName), labelPreview2.Font.Size, FontStyle.Bold);
labelPreview3.Font = new Font(new FontFamily(FontName), labelPreview3.Font.Size, FontStyle.Bold);
}
catch
{
labelPreview1.Font = new Font(new FontFamily(FontName), labelPreview1.Font.Size, FontStyle.Italic);
labelPreview2.Font = new Font(new FontFamily(FontName), labelPreview2.Font.Size, FontStyle.Italic);
labelPreview3.Font = new Font(new FontFamily(FontName), labelPreview3.Font.Size, FontStyle.Italic);
}
}
}
private void buttonOK_Click(object sender, EventArgs e)

View File

@ -13768,7 +13768,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitleListViewIndex = -1;
SubtitleListview1.FirstVisibleIndex = -1;
SubtitleListview1.SelectIndexAndEnsureVisible(0, true);
RefreshSelectedParagraph();
_fileName = Utilities.GetPathAndFileNameWithoutExtension(matroska.Path) + GetCurrentSubtitleFormat().Extension;
_converted = true;
SetTitle();
@ -13865,7 +13865,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitleListViewIndex = -1;
SubtitleListview1.FirstVisibleIndex = -1;
SubtitleListview1.SelectIndexAndEnsureVisible(0, true);
RefreshSelectedParagraph();
_fileName = Utilities.GetPathAndFileNameWithoutExtension(matroska.Path) + GetCurrentSubtitleFormat().Extension;
_converted = true;
SetTitle();
@ -13978,8 +13978,9 @@ namespace Nikse.SubtitleEdit.Forms
_subtitleListViewIndex = -1;
SubtitleListview1.FirstVisibleIndex = -1;
SubtitleListview1.SelectIndexAndEnsureVisible(0, true);
RefreshSelectedParagraph();
_fileName = string.Empty;
_converted = true;
SetTitle();
Configuration.Settings.Save();