Commit 216d693f authored by campaign's avatar campaign

回退修复

parent 6e17b170
...@@ -54,6 +54,7 @@ KityMinder.registerModule("HistoryModule", function() { ...@@ -54,6 +54,7 @@ KityMinder.registerModule("HistoryModule", function() {
} }
}, },
partialRenewal: function(target) { partialRenewal: function(target) {
var selectedNodes = [];
function compareNode(source, target) { function compareNode(source, target) {
if (source.getText() != target.getText()) { if (source.getText() != target.getText()) {
return false; return false;
...@@ -81,9 +82,7 @@ KityMinder.registerModule("HistoryModule", function() { ...@@ -81,9 +82,7 @@ KityMinder.registerModule("HistoryModule", function() {
if (compareNode(srcNode, tagNode) === false) { if (compareNode(srcNode, tagNode) === false) {
srcNode.setValue(tagNode); srcNode.setValue(tagNode);
if (srcNode.isSelected()) { if (srcNode.isSelected()) {
km.select(srcNode); selectedNodes.push(srcNode);
} else {
km.removeSelectedNodes(srcNode);
} }
} }
for (var i = 0, j = 0, si, tj; for (var i = 0, j = 0, si, tj;
...@@ -102,6 +101,7 @@ KityMinder.registerModule("HistoryModule", function() { ...@@ -102,6 +101,7 @@ KityMinder.registerModule("HistoryModule", function() {
traverseNode(km.getRoot(), target); traverseNode(km.getRoot(), target);
km.layout(); km.layout();
km.select(selectedNodes,true);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment