Fix #1886882 ["Sort by" unavailable in main toolbar when device is connected](https://bugs.launchpad.net/calibre/+bug/1886882)

This commit is contained in:
Kovid Goyal 2020-07-13 08:59:56 +05:30
parent fc2ba657f8
commit 1578573a7b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -32,9 +32,7 @@ class SortByAction(InterfaceAction):
action_type = 'current' action_type = 'current'
popup_type = QToolButton.InstantPopup popup_type = QToolButton.InstantPopup
action_add_menu = True action_add_menu = True
dont_add_to = frozenset([ dont_add_to = frozenset(('context-menu-cover-browser', ))
'toolbar-device', 'context-menu-device', 'menubar', 'menubar-device',
'context-menu-cover-browser'])
def genesis(self): def genesis(self):
self.sorted_icon = QIcon(I('ok.png')) self.sorted_icon = QIcon(I('ok.png'))