fix removing torrents that fail to download when added via url

This commit is contained in:
Damien Churchill 2009-10-21 20:30:07 +00:00
parent 2289b5f173
commit 36e74e05ca
1 changed files with 2 additions and 3 deletions

View File

@ -203,7 +203,6 @@ Ext.deluge.add.OptionsPanel = Ext.extend(Ext.TabPanel, {
}));
this.form.on('render', this.onFormRender, this);
this.form.disable();
},
onFormRender: function(form) {
@ -491,10 +490,10 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
var selection = this.grid.getSelectionModel();
if (!selection.hasSelection()) return;
var torrent = selection.getSelected();
delete this.torrents[torrent.id];
this.grid.getStore().remove(torrent);
this.optionsPanel.clear();
if (this.torrents && this.torrents[torrent.id]) delete this.torrents[torrent.id];
},
onSelect: function(selModel, rowIndex, record) {