fix(menumodel): fix for loop
This commit is contained in:
parent
b1cd9a6683
commit
a3e2da3972
1 changed files with 2 additions and 1 deletions
|
@ -83,8 +83,9 @@ function MenuModel:getList(first, lenght)
|
|||
local first = first or 1
|
||||
local lenght = lenght or #self.list
|
||||
lenght = math.min(lenght, (#self.list + 1 - first))
|
||||
local last = (first + lenght - 1)
|
||||
|
||||
for i = first, lenght do
|
||||
for i = first, (last) do
|
||||
table.insert(listWidget, self.list[i])
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue