From: Aleksander Ɓukasz Date: Thu, 24 Oct 2013 07:52:15 +0000 (+0200) Subject: Fixing dirty state management in source editor X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/ced9a118070af71c7427074e890f3db02092927c Fixing dirty state management in source editor Without setting this flag here, ace editor change event triggered on initial document load was followed by setting xml on document again in onHide event handler. --- diff --git a/src/editor/modules/sourceEditor/sourceEditor.js b/src/editor/modules/sourceEditor/sourceEditor.js index 8159680..0d7b12e 100644 --- a/src/editor/modules/sourceEditor/sourceEditor.js +++ b/src/editor/modules/sourceEditor/sourceEditor.js @@ -13,6 +13,8 @@ return function(sandbox) { if(documentIsDirty) { editor.setValue(wlxmlDocument.toXML()); editor.gotoLine(0); + documentEditedHere = false; + sandbox.publish('documentSet'); documentIsDirty = false; }