select the first filter if the current selected one is removed

This commit is contained in:
Damien Churchill 2010-04-25 19:39:38 +01:00
parent 2edf19c187
commit faa1752d04
1 changed files with 4 additions and 0 deletions

View File

@ -141,7 +141,11 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
store.each(function(record) {
if (filters[record.id]) return;
var r = this.list.getSelectedRecords()[0];
store.remove(record);
if (r.id == record.id) {
this.list.select(0);
}
}, this);
store.commitChanges();