list_search not search in disabled objects

This commit is contained in:
p.kosyh 2009-10-11 15:13:45 +00:00
parent 598208e3c9
commit f37fe09761

View file

@ -458,7 +458,7 @@ function list_search(self, n)
return nil return nil
end end
end end
if isDisabled(self[i]) then if isDisabled(ref(self[i])) then
return nil; return nil;
end end
return self[i], i; return self[i], i;
@ -1780,7 +1780,7 @@ end
function have(obj) function have(obj)
local o = inv():srch(obj); local o = inv():srch(obj);
o = ref(o); o = ref(o);
if isObject(o) and not isDisabled(o) then if isObject(o) then
return o return o
end end
return nil return nil