Fix crash after commit 57c8c753cb - thx OmrSi :)

This commit is contained in:
Nikolaj Olsson 2020-10-11 07:01:42 +02:00
parent 57c8c753cb
commit 12481e7136

View File

@ -1450,8 +1450,11 @@ namespace Nikse.SubtitleEdit.Forms
treeViewShortcuts.ExpandAll();
treeViewShortcuts.EndUpdate();
if (treeViewShortcuts.Nodes.Count > 0)
{
treeViewShortcuts.SelectedNode = treeViewShortcuts.Nodes[0];
}
}
private void AddNode(TreeNode parentNode, string text, ShortcutHelper shortcut)
{
@ -3431,6 +3434,7 @@ namespace Nikse.SubtitleEdit.Forms
var s = new XmlSerializer(typeof(Shortcuts));
Configuration.Settings.Shortcuts = (Shortcuts)s.Deserialize(r);
r.Close();
textBoxShortcutSearch.Text = String.Empty;
MakeShortcutsTreeView(Configuration.Settings.Language.Settings);
ShowShortcutsTreeView();
}