From: Aleksander Ɓukasz Date: Tue, 21 Jan 2014 10:31:46 +0000 (+0100) Subject: wlxml: metadata fix - missing event X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/67d116b3f6f2b4a62f31433bd7b3cb85ecc0c171 wlxml: metadata fix - missing event --- 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}); } }),