From faa1752d049b272a10002787f2f9c9a77142edda Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Sun, 25 Apr 2010 19:39:38 +0100 Subject: [PATCH] select the first filter if the current selected one is removed --- deluge/ui/web/js/deluge-all/FilterPanel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deluge/ui/web/js/deluge-all/FilterPanel.js b/deluge/ui/web/js/deluge-all/FilterPanel.js index 53ab3b345..09c2153b3 100644 --- a/deluge/ui/web/js/deluge-all/FilterPanel.js +++ b/deluge/ui/web/js/deluge-all/FilterPanel.js @@ -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();