From: Aleksander Ɓukasz Date: Tue, 21 Jan 2014 11:13:58 +0000 (+0100) Subject: wlxml: metadata - ignore setting the same value as the old one X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/e35e6b0ed784fadd45452af8750e23ace7c1fd40?ds=inline;hp=295c9ced8e77df8e0d83951159d3c3c416771753 wlxml: metadata - ignore setting the same value as the old one --- diff --git a/src/wlxml/extensions/metadata/metadata.js b/src/wlxml/extensions/metadata/metadata.js index acd404c..899306d 100644 --- a/src/wlxml/extensions/metadata/metadata.js +++ b/src/wlxml/extensions/metadata/metadata.js @@ -17,6 +17,9 @@ _.extend(Row.prototype, { ChangeProperty: smartxmlTransformations.createContextTransformation({ impl: function(t, rowIndex, propName, value) { var row = this.getMetadata().at(rowIndex); + if(row.getValue() === value) { + return; + } t.rowIndex = rowIndex; t.propName = propName; t.oldValue = row[propName];