mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +00:00
[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:
@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user