[building menu] The BuildingMenuCmdSet is permanent only if the menu is persistent
This commit is contained in:
parent
e26f04d573
commit
a7b4dc09e9
1 changed files with 2 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ def _menu_savefunc(caller, buf):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _menu_quitfunc(caller):
|
def _menu_quitfunc(caller):
|
||||||
caller.cmdset.add(BuildingMenuCmdSet)
|
caller.cmdset.add(BuildingMenuCmdSet, permanent=calelr.ndb._building_menu and caller.ndb._building_menu.persistent or False)
|
||||||
if caller.ndb._building_menu:
|
if caller.ndb._building_menu:
|
||||||
caller.ndb._building_menu.move(back=True)
|
caller.ndb._building_menu.move(back=True)
|
||||||
|
|
||||||
|
|
@ -767,7 +767,7 @@ class BuildingMenu(object):
|
||||||
"""
|
"""
|
||||||
caller = self.caller
|
caller = self.caller
|
||||||
self._save()
|
self._save()
|
||||||
self.caller.cmdset.add(BuildingMenuCmdSet, permanent=True)
|
self.caller.cmdset.add(BuildingMenuCmdSet, permanent=self.persistent)
|
||||||
self.display()
|
self.display()
|
||||||
|
|
||||||
def open_parent_menu(self):
|
def open_parent_menu(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue