Module: deluge
Branch: master
Commit: faa1752d049b272a10002787f2f9c9a77142edda

Author: Damien Churchill <[email protected]>
Date:   Sun Apr 25 19:39:38 2010 +0100

select the first filter if the current selected one is removed

---

 deluge/ui/web/js/deluge-all/FilterPanel.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/FilterPanel.js 
b/deluge/ui/web/js/deluge-all/FilterPanel.js
index 53ab3b3..09c2153 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();

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to