web: few sidebar fixes
This commit is contained in:
parent
e3e20aa14f
commit
1837d833c2
|
@ -174,7 +174,9 @@ Ext.define('Deluge.FilterPanel', {
|
||||||
if (filters[record.getId()]) return;
|
if (filters[record.getId()]) return;
|
||||||
var r = sm.getLastSelected();
|
var r = sm.getLastSelected();
|
||||||
store.remove(record);
|
store.remove(record);
|
||||||
if (r.id == record.id) {
|
if (r === undefined)
|
||||||
|
return;
|
||||||
|
if (r.getId() == record.getId()) {
|
||||||
sm.select(0);
|
sm.select(0);
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
|
@ -90,13 +90,9 @@ Ext.define('Deluge.Sidebar', {
|
||||||
deluge.ui.update();
|
deluge.ui.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.defer(function() {
|
if (!sm.hasSelection() && s.count() > 0) {
|
||||||
panel.doLayout();
|
sm.select([s.first()]);
|
||||||
}, 100);
|
}
|
||||||
console.log('switching');
|
|
||||||
//if (!sm.hasSelection() && s.count() > 0) {
|
|
||||||
// sm.select([s.first()]);
|
|
||||||
//}
|
|
||||||
});
|
});
|
||||||
this.fireEvent('filtercreate', this, panel);
|
this.fireEvent('filtercreate', this, panel);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue