remove infinite editing backdrop when discarding changes

This commit is contained in:
Mads Rasmussen
2018-12-10 11:38:43 +01:00
parent a11b442cfd
commit 98cc48c0d3
2 changed files with 9 additions and 6 deletions

View File

@@ -203,11 +203,14 @@
}));
evts.push(eventsService.on("appState.editors.close", function (name, args) {
removeEditor(args.editor);
}));
evts.push(eventsService.on("appState.editors.closeAll", function (name, args) {
scope.editors = [];
// remove the closed editor
if(args && args.editor) {
removeEditor(args.editor);
}
// close all editors
if(args && args.editors.length === 0) {
scope.editors = [];
}
}));
//ensure to unregister from all events!

View File

@@ -98,7 +98,7 @@
editor: null
};
eventsService.emit("appState.editors.closeAll", args);
eventsService.emit("appState.editors.close", args);
}
/**