fix the first item being selected upon creation

This commit is contained in:
Damien Churchill 2010-04-28 08:42:29 +01:00
parent 9f185da446
commit fec735f948
1 changed files with 4 additions and 6 deletions

View File

@ -77,12 +77,6 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
}]
});
this.relayEvents(this.list, ['selectionchange']);
this.list.afterMethod('bindStore', this.doBindStore, this);
},
// private
doBindStore: function() {
this.list.select(0);
},
/**
@ -160,6 +154,10 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
}, this);
store.commitChanges();
if (!this.list.getSelectionCount()) {
this.list.select(0);
}
},
});