mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-03 23:23:27 +00:00
add clearing the tree when the selection is changed
This commit is contained in:
parent
3bd13595be
commit
e608db8ce2
@ -68,7 +68,14 @@ Deluge.Add = {
|
||||
}
|
||||
});
|
||||
}
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user