Bug Report + Solution: "Please select a graph" when maximized

FlowCanvas Forums Support Bug Report + Solution: "Please select a graph" when maximized

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2821
    joshcamas
    Participant

      Hello, another bug report. 🙂 If the user has happened to have their canvas maximized and closed / opened unity, they’d see the “Please select graph” in a maximized canvas, with double click not doing anything. You can unmaximize via the unity way (window way) but having no double click can be confusing.

      To fix, one must merely add the detection for double click + maximize flip in the GraphEditor.ShowEmptyGraphGUI function!

       

      void ShowEmptyGraphGUI() {
                  if ( targetOwner != null ) {
                      var text = string.Format(“The selected {0} does not have a {1} assigned.\n Please create or assign a new one in it’s inspector.”, targetOwner.GetType().Name, targetOwner.graphType.Name);
                      ShowNotification(new GUIContent(text));
                      return;
                  }
                  ShowNotification(new GUIContent(“Please select a GraphOwner GameObject or a Graph Asset.”));

                  //Double click check
                  Event e = Event.current;
                  if (e.type == EventType.MouseDown && e.clickCount == 2 && e.button == 0)
                  {
                      current.maximized = !current.maximized;
                      e.Use();
                  }

              }

      #2824
      Gavalakis
      Keymaster

        Thanks, I will add this, no problem 🙂

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.