primitivus: fixed bad closure, resulting in menus bug.

This commit is contained in:
Goffi 2014-02-04 18:02:37 +01:00
commit 3b86e8b106

View file

@ -305,7 +305,7 @@ class PrimitivusApp(QuickApp, InputHistory):
assert(type_=="NORMAL") #TODO: manage other types
if len(path) != 2:
raise NotImplementedError("Menu with a path != 2 are not implemented yet")
menu.addMenu(path_i18n[0], path_i18n[1], lambda menu: add_menu_cb(id_))
menu.addMenu(path_i18n[0], path_i18n[1], lambda menu,id_=id_: add_menu_cb(id_))
menu_roller = sat_widgets.MenuRoller([(_('Main menu'),menu)])
return menu_roller