mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix number of marked books in menu not being updated when deleting books
Fix number of marked books shown in the drop down menu of the Mark Books action not being updated when marked books are deleted (as opposed to being unmarked). Fixes #1248506 [Incorrect number of marked books in "Show marked books" menu entry](https://bugs.launchpad.net/calibre/+bug/1248506)
This commit is contained in:
parent
d4b3e94afc
commit
087bcee620
@ -87,7 +87,7 @@ class MarkBooksAction(InterfaceAction):
|
||||
|
||||
def about_to_show_menu(self):
|
||||
db = self.gui.current_db
|
||||
num = len(db.data.marked_ids)
|
||||
num = len(frozenset(db.data.marked_ids).intersection(db.new_api.all_book_ids()))
|
||||
text = _('Show marked book') if num == 1 else (_('Show marked books') + (' (%d)' % num))
|
||||
self.show_marked_action.setText(text)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user