diff --git a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldGraphWindow.cs b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldGraphWindow.cs index 5e996fc251224443f1c4394b2608f28d3c162e0c..867c75803fa0fd71b2017b2fd25458203a2170c2 100644 --- a/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldGraphWindow.cs +++ b/Assets/ETSI.ARF/ARF World Storage API/Editor/Windows/WorldGraphWindow.cs @@ -47,9 +47,13 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows public static void ShowWindowFromWorldStorageWindow(WorldStorageServer server, WorldStorageUser user) { var window = GetWindow<WorldGraphWindow>("Graph Editor", true, typeof(SceneView)); - if (window.myGraph != null && window.myGraph.ServerAndLocalDifferent() && EditorUtility.DisplayDialog("Saving node positions", "The World Graph has been modified. \nWould you like to push the modifications to the server ?", "Yes", "No")) + if (window.myGraph != null) { - window.myGraph.SaveInServer(); + if (window.myGraph.ServerAndLocalDifferent() && EditorUtility.DisplayDialog("Saving node positions", "The World Graph has been modified. \nWould you like to push the modifications to the server ?", "Yes", "No")) + { + window.myGraph.SaveInServer(); + } + window.rootVisualElement.Remove(window.myGraph); } GraphEditorWindow.ResetWindow(); window.worldStorageServer = server;