Module: deluge
Branch: master
Commit: 7420c6f12fdfec868f2d48f87b710bc3a73baf87

Author: Damien Churchill <[email protected]>
Date:   Wed Apr 28 15:29:40 2010 +0100

use the header click event to ensure that the filters get updated
correctly

---

 deluge/ui/web/js/deluge-all/Sidebar.js |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/Sidebar.js 
b/deluge/ui/web/js/deluge-all/Sidebar.js
index 7b81cec..d8e67f7 100644
--- a/deluge/ui/web/js/deluge-all/Sidebar.js
+++ b/deluge/ui/web/js/deluge-all/Sidebar.js
@@ -77,15 +77,19 @@ Deluge.Sidebar = Ext.extend(Ext.Panel, {
                panel.on('selectionchange', function(view, nodes) {
                        deluge.ui.update();
                });
-               panel.on('show', function() {
-                       if (!deluge.config.sidebar_multiple_filters) {
-                               deluge.ui.update();
-                       }
-               });
                this.add(panel);
        
                this.doLayout();
                this.panels[filter] = panel;
+
+               panel.header.on('click', function(panel) {
+                       if (!deluge.config.sidebar_multiple_filters) {
+                               deluge.ui.update();
+                       }
+                       if (panel.list.getSelectionCount()) {
+                               panel.list.select(0);   
+                       }
+               });
                this.fireEvent('filtercreate', this, panel);
 
                panel.updateStates(states);

-- 
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