OverlaySelector: don't choke if there are no options
This commit is contained in:
parent
c6614ce178
commit
e96322b351
1 changed files with 14 additions and 11 deletions
|
@ -352,7 +352,9 @@ var OverlaySelector = {
|
|||
},
|
||||
rescan: func {
|
||||
me.data = [];
|
||||
foreach (var file; directory(me.dir)) {
|
||||
var files = directory(me.dir);
|
||||
if (size(files)) {
|
||||
foreach (var file; files) {
|
||||
if (substr(file, -4) != ".xml")
|
||||
continue;
|
||||
var n = io.read_properties(me.dir ~ file);
|
||||
|
@ -364,6 +366,7 @@ var OverlaySelector = {
|
|||
}
|
||||
me.data = sort(me.data, func(a, b) num(a[1]) == nil or num(b[1]) == nil
|
||||
? cmp(a[1], b[1]) : a[1] - b[1]);
|
||||
}
|
||||
|
||||
me.list.removeChildren("value");
|
||||
forindex (var i; me.data)
|
||||
|
|
Loading…
Reference in a new issue