Browse Source

removed project unloaded event and fixed issue with delete resource event

Shaddock Heath 9 years ago
parent
commit
4e317af403

+ 1 - 6
Script/AtomicEditor/ui/resourceEditors/AbstractTextResourceEditorBuilder.ts

@@ -61,14 +61,9 @@ export abstract class AbstractTextResourceEditorBuilder implements Editor.Extens
         //     }
         //     }
         // });
         // });
 
 
-        editor.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => {
-            const webClient = editor.webView.webClient;
-            webClient.executeJavaScript("HOST_projectUnloaded();");
-        });
-
         editor.subscribeToEvent(EditorEvents.DeleteResourceNotification, (data) => {
         editor.subscribeToEvent(EditorEvents.DeleteResourceNotification, (data) => {
             const webClient = editor.webView.webClient;
             const webClient = editor.webView.webClient;
-            webClient.executeJavaScript(`HOST_resourceDeleted("atomic://${this.getNormalizedPath(editor.fullPath)}");`);
+            webClient.executeJavaScript(`HOST_resourceDeleted("atomic://${this.getNormalizedPath(data.path)}");`);
         });
         });
 
 
         editor.subscribeToEvent(EditorEvents.UserPreferencesChangedNotification, (data) => {
         editor.subscribeToEvent(EditorEvents.UserPreferencesChangedNotification, (data) => {