Skip to content
Snippets Groups Projects
Commit 76b27192 authored by Nathan Chambron's avatar Nathan Chambron
Browse files

fix: remove graph when selecting unreachable server

parent 4dc8413b
No related branches found
No related tags found
2 merge requests!5Merge into graph view,!4Add GraphView module & the World Storage inspector window into the main branch
...@@ -47,9 +47,13 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows ...@@ -47,9 +47,13 @@ namespace Assets.ETSI.ARF.ARF_World_Storage_API.Editor.Windows
public static void ShowWindowFromWorldStorageWindow(WorldStorageServer server, WorldStorageUser user) public static void ShowWindowFromWorldStorageWindow(WorldStorageServer server, WorldStorageUser user)
{ {
var window = GetWindow<WorldGraphWindow>("Graph Editor", true, typeof(SceneView)); 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(); GraphEditorWindow.ResetWindow();
window.worldStorageServer = server; window.worldStorageServer = server;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment