private void RePopulateTreeView()
{
_guiController.ProjectTree.RemoveAllChildNodes(this, TOP_LEVEL_COMMAND_ID);
_guiController.ProjectTree.StartFromNode(this, TOP_LEVEL_COMMAND_ID);
foreach (AGS.Types.Font item in _agsEditor.CurrentGame.Fonts)
{
_guiController.ProjectTree.AddTreeLeaf(this, GetNodeID(item), item.ID.ToString() + ": " + item.Name, "FontIcon");
}
if (_documents.ContainsValue(_guiController.ActivePane))
{
FontEditor editor = (FontEditor)_guiController.ActivePane.Control;
_guiController.ProjectTree.SelectNode(this, GetNodeID(editor.ItemToEdit));
}
else if (_agsEditor.CurrentGame.Fonts.Count > 0)
{
_guiController.ProjectTree.SelectNode(this, "Fnt0");
}
}