/// <summary> Make sure the graph editor is assigned and to the right object </summary> private void ValidateGraphEditor() { NodeGraphEditor graphEditor = NodeGraphEditor.GetEditor(graph, this); if (this.graphEditor != graphEditor) { this.graphEditor = graphEditor; graphEditor.OnOpen(); } }
/// <summary> Make sure the graph editor is assigned and to the right object </summary> private void ValidateGraphEditor() { NodeGraphEditor graphEditor = NodeGraphEditor.GetEditor(graph, this); if (this.graphEditor != graphEditor && graphEditor != null) { var oldgraphEditor = this.graphEditor; this.graphEditor = graphEditor; oldgraphEditor?.OnClose(); graphEditor.OnOpen(); } }
/// <summary> Make sure the graph editor is assigned and to the right object </summary> private void ValidateGraphEditor() { if (graph is DialogGraph) { DialogGraphEditor graphEditor = (DialogGraphEditor)DialogGraphEditor.GetEditor(graph, this); if (this.graphEditor != graphEditor && graphEditor != null) { this.graphEditor = graphEditor; graphEditor.OnOpen(); } } else { NodeGraphEditor graphEditor = NodeGraphEditor.GetEditor(graph, this); if (this.graphEditor != graphEditor && graphEditor != null) { this.graphEditor = graphEditor; graphEditor.OnOpen(); } } }