[Edit] Undirty objects on refresh

Remove domain objects from the active transaction when they
are refreshed, and use this from the SaveAsAction to prevent
saving unintended changes. Fixes #1046
This commit is contained in:
Victor Woeltjen
2016-06-22 15:32:37 -07:00
parent 5485950130
commit e42b8d22f7
3 changed files with 37 additions and 4 deletions

View File

@ -81,6 +81,15 @@ define(
//Log error because this is a programming error if it occurs.
this.$log.error("No transaction in progress");
}
return function () {
this.onCommits = this.onCommits.filter(function (callback) {
return callback !== onCommit;
});
this.onCancels = this.onCancels.filter(function (callback) {
return callback !== onCancel;
});
}.bind(this);
};
/**