Saving dialog, storing change description
[fnpeditor.git] / modules / nodeFamilyTree / nodeFamilyTree.js
index 3c78bd1..7415b2d 100644 (file)
@@ -31,6 +31,7 @@ return function(sandbox) {
         setNode: function(node) {\r
             console.log('familyTree sets node');\r
             var nodes = this.nodes = {};\r
+            this.currentNode = node;\r
             var parentNode = node.parent();\r
             var parent = undefined;\r
             \r
@@ -65,8 +66,9 @@ return function(sandbox) {
         start: function() {\r
             sandbox.publish('ready');\r
         },\r
-        setNode: function(node) {\r
-            view.setNode(node);\r
+        setNode: function(wlxmlNode) {\r
+            if(!wlxmlNode.is(view.currentNode))\r
+                view.setNode(wlxmlNode);\r
         },\r
         getView: function() {\r
             return view.dom;\r