Fix device entry not visible in menubar even when it has been added via Preferences->Toolbars. Fixes #923175 (location manager not accessible from the menubar)

This commit is contained in:
Kovid Goyal 2012-02-02 12:14:53 +05:30
parent ce3cc5995c
commit cd85d375f5

View File

@ -199,8 +199,9 @@ class MenuBar(QMenuBar): # {{{
def update_lm_actions(self): def update_lm_actions(self):
for ac in self.added_actions: for ac in self.added_actions:
if ac in self.location_manager.all_actions: clone = getattr(ac, 'clone', None)
ac.setVisible(ac in self.location_manager.available_actions) if clone is not None and clone in self.location_manager.all_actions:
ac.setVisible(clone in self.location_manager.available_actions)
def init_bar(self, actions): def init_bar(self, actions):
for ac in self.added_actions: for ac in self.added_actions: