X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/188424fd73ee2cd6e4d4ac64a85dda828b527bf7..67d116b3f6f2b4a62f31433bd7b3cb85ecc0c171:/src/wlxml/extensions/metadata/metadata.js?ds=sidebyside diff --git a/src/wlxml/extensions/metadata/metadata.js b/src/wlxml/extensions/metadata/metadata.js index b19cd52..acd404c 100644 --- a/src/wlxml/extensions/metadata/metadata.js +++ b/src/wlxml/extensions/metadata/metadata.js @@ -85,8 +85,10 @@ _.extend(Metadata.prototype, { this.triggerChangeEvent('metadataRemoved', {row: t.row}); }, undo: function(t) { - var metadata = this.getMetadata(); - metadata._rows.splice(t.rowIdx, 0, new Row(t.row.getKey(), t.row.getValue(), metadata)); + var metadata = this.getMetadata(), + row = new Row(t.row.getKey(), t.row.getValue(), metadata); + metadata._rows.splice(t.rowIdx, 0, row); + this.triggerChangeEvent('metadataAdded', {row: row}); } }),