fix: reset current page on item_table switch for menu widget

This commit is contained in:
Qingping Hou
2013-08-22 12:01:00 +08:00
parent cad8ddec92
commit c951eacc35
2 changed files with 15 additions and 11 deletions

View File

@@ -477,7 +477,10 @@ function Menu:updateItems(select_number)
end
function Menu:swithItemTable(new_title, new_item_table)
self.menu_title.text = new_title
if self.menu_title then
self.menu_title.text = new_title
end
self.page = 1
self.item_table = new_item_table
self:updateItems(1)
end