1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

!BO(Menu Tree View) 可能会出现多个相同菜单,删除了OnFocus

This commit is contained in:
Icarus 2019-12-09 11:10:25 +08:00
parent a749defa24
commit cf6cddeae5

View File

@ -156,6 +156,17 @@ namespace XNodeEditor {
break; break;
} }
if (last.hasChildren)
{
foreach (var child in last.children)
{
if (child.displayName == path)
{
return;
}
}
}
var temp = new TreeViewItem(_id++,depth++,path); var temp = new TreeViewItem(_id++,depth++,path);
last.AddChild(temp); last.AddChild(temp);
@ -248,15 +259,6 @@ namespace XNodeEditor {
/// <summary> Called when opened by NodeEditorWindow </summary> /// <summary> Called when opened by NodeEditorWindow </summary>
public virtual void OnOpen() { } public virtual void OnOpen() { }
public virtual void OnFocus()
{
foreach (var targetNode in target.nodes)
{
var editor = NodeEditor.GetEditor(targetNode, window);
editor?.OnInit();
}
}
public virtual Texture2D GetGridTexture() { public virtual Texture2D GetGridTexture() {
return NodeEditorPreferences.GetSettings().gridTexture; return NodeEditorPreferences.GetSettings().gridTexture;
} }