예제 #1
0
 /// <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();
     }
 }
예제 #2
0
        /// <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();
            }
        }
예제 #3
0
 /// <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();
         }
     }
 }