1
0
Fork 0

- faster sorting

- update loop fix
This commit is contained in:
mfranz 2009-02-01 01:58:15 +00:00
parent a644007c67
commit afe8de52ab

View file

@ -320,7 +320,7 @@ var dialog = {
PILOTSDLG_RUNNING=1; PILOTSDLG_RUNNING=1;
me.init(-2, -2); me.init(-2, -2);
me.create(); me.create();
me.update(); me.update(me.loopid += 1);
} }
}, },
toggle: func { toggle: func {
@ -373,10 +373,11 @@ var model = {
model = me.remove_suffix(model, "-anim"); model = me.remove_suffix(model, "-anim");
var path = n.getPath(); var path = n.getPath();
me.data[path] = { node: n, callsign: callsign, model: model, path: path }; me.data[path] = { node: n, callsign: callsign, model: model,
path: path, sort: string.lc(callsign)};
} }
me.list = sort(keys(me.data), func(a, b) string.icmp(me.data[a].callsign, me.data[b].callsign)); me.list = sort(keys(me.data), func(a, b) cmp(me.data[a].sort, me.data[b].sort));
forindex (var i; me.list) forindex (var i; me.list)
me.list[i] = me.data[me.list[i]]; me.list[i] = me.data[me.list[i]];