fix #1537 editing trackers list, trackers have to be reselected

This commit is contained in:
Damien Churchill 2011-05-06 23:43:40 +01:00
parent 58134925a2
commit d658c8fe47
1 changed files with 29 additions and 21 deletions

View File

@ -216,16 +216,24 @@ Deluge.EditTrackersWindow = Ext.extend(Ext.Window, {
onDownClick: function() {
var r = this.list.getSelectedRecords()[0];
if (!r) return;
r.set('tier', r.get('tier') + 1);
r.commit();
r.store.sort('tier', 'ASC');
r.store.commitChanges();
this.list.select(r.store.indexOf(r));
},
onUpClick: function() {
var r = this.list.getSelectedRecords()[0];
if (!r) return;
if (r.get('tier') == 0) return;
r.set('tier', r.get('tier') - 1);
r.commit();
r.store.sort('tier', 'ASC');
r.store.commitChanges();
this.list.select(r.store.indexOf(r));
}
});