web: few sidebar fixes

This commit is contained in:
Damien Churchill 2011-11-21 23:05:02 +00:00
parent e3e20aa14f
commit 1837d833c2
2 changed files with 6 additions and 8 deletions

View File

@ -174,7 +174,9 @@ Ext.define('Deluge.FilterPanel', {
if (filters[record.getId()]) return;
var r = sm.getLastSelected();
store.remove(record);
if (r.id == record.id) {
if (r === undefined)
return;
if (r.getId() == record.getId()) {
sm.select(0);
}
}, this);

View File

@ -90,13 +90,9 @@ Ext.define('Deluge.Sidebar', {
deluge.ui.update();
}
Ext.defer(function() {
panel.doLayout();
}, 100);
console.log('switching');
//if (!sm.hasSelection() && s.count() > 0) {
// sm.select([s.first()]);
//}
if (!sm.hasSelection() && s.count() > 0) {
sm.select([s.first()]);
}
});
this.fireEvent('filtercreate', this, panel);