From: Aleksander Ɓukasz Date: Fri, 14 Jun 2013 11:40:12 +0000 (+0200) Subject: Fixing is-dirty management in rng module X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/e5ddc7a08a1464b59075e435c959cd957238fabd?ds=sidebyside Fixing is-dirty management in rng module --- diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 16a6d25..a13cfce 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -35,6 +35,7 @@ return function(sandbox) { if(slug === 'sourceEditor') { doc = sandbox.getModule('sourceEditor').getDocument(); reason = 'source_edit'; + dirty.sourceEditor = false; } if(slug === 'editor') { var doc = dirty.documentCanvas ? sandbox.getModule('documentCanvas').getDocument() : sandbox.getModule('data').getDocument(); @@ -42,6 +43,7 @@ return function(sandbox) { doc = sandbox.getModule('metadataEditor').attachMetadata(doc); } reason = 'edit'; + dirty.documentCanvas = dirty.metadataEditor = false; } sandbox.getModule('data').commitDocument(doc, reason); }