[Edit Mode] Fixed issue with save dialog not being displayed for new objects after mutation. Fixes 1080

This commit is contained in:
Henry
2016-09-21 16:12:09 -07:00
parent e0b6986851
commit 3548cde9c4
5 changed files with 69 additions and 23 deletions

View File

@ -69,18 +69,14 @@ define(
* Enter edit mode.
*/
EditAction.prototype.perform = function () {
var self = this;
function cancelEditing() {
self.domainObject.getCapability('editor').cancel();
self.navigationService.removeListener(cancelEditing);
}
//If this is not the currently navigated object, then navigate
// to it.
if (this.navigationService.getNavigation() !== this.domainObject) {
this.navigationService.setNavigation(this.domainObject);
}
this.navigationService.addListener(cancelEditing);
//this.navigationService.addListener(cancelEditing);
this.domainObject.useCapability("editor");
};

View File

@ -138,7 +138,7 @@ define(
try {
results.push(onCancel());
} catch (error) {
this.$log.error("Error committing transaction.");
this.$log.error("Error cancelling transaction.");
}
}
return this.$q.all(results).then(function () {