This commit is contained in:
Kovid Goyal 2022-10-20 21:17:52 +05:30
commit 7fda097623
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -667,10 +667,11 @@ class SearchToolBar(QHBoxLayout):
self.setup_tool_button(self, qact, act.popup_type)
def widgetForAction(self, action):
dex = self.search_tool_bar_actions.index(action)
if dex < 0:
try:
dex = self.search_tool_bar_actions.index(action)
return self.search_tool_bar_widgets[dex]
except Exception:
return None
return self.search_tool_bar_widgets[dex]
def setup_tool_button(self, bar, ac, menu_mode=None):
widget = self.widgetForAction(ac)