mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 12:04:51 +00:00
add clearing the tree when the selection is changed
This commit is contained in:
parent
3bd13595be
commit
e608db8ce2
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue