From ced9a118070af71c7427074e890f3db02092927c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 24 Oct 2013 09:52:15 +0200 Subject: [PATCH] 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. --- src/editor/modules/sourceEditor/sourceEditor.js | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.20.1