Author: damoxc
Revision: 4959
Log:
add clearing the tree when the selection is changed
Diff:
Modified: trunk/deluge/ui/web/js/deluge-add.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-add.js 2009-03-31 00:33:56 UTC (rev
4958)
+++ trunk/deluge/ui/web/js/deluge-add.js 2009-03-31 00:41:05 UTC (rev
4959)
@@ -68,7 +68,14 @@
}
});
}
- walk(torrentInfo['files'], Deluge.Add.Files.getRootNode());
+
+ var root = Deluge.Add.Files.getRootNode();
+ if (!root.hasChildNodes()) return;
+ root.cascade(function(node) {
+ if (!node.parentNode || !node.getOwnerTree()) return;
+ node.remove();
+ });
+ walk(torrentInfo['files'], root);
},
onTorrentAdded: function(info) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---