mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2107683 [Remove Id, Modified, Size etc in Book Details gives error](https://bugs.launchpad.net/calibre/+bug/2107683)
This commit is contained in:
parent
8206dd2966
commit
313367c5b7
@ -579,7 +579,9 @@ def add_item_specific_entries(menu, data, book_info, copy_menu, search_menu):
|
|||||||
v = data.get('original_value') or data.get('value')
|
v = data.get('original_value') or data.get('value')
|
||||||
copy_menu.addAction(QIcon.ic('edit-copy.png'), _('The text: {}').format(v),
|
copy_menu.addAction(QIcon.ic('edit-copy.png'), _('The text: {}').format(v),
|
||||||
lambda: QApplication.instance().clipboard().setText(v))
|
lambda: QApplication.instance().clipboard().setText(v))
|
||||||
if field != 'size':
|
if field not in ('size', 'id', 'last_modified'):
|
||||||
|
fm = get_gui().current_db.new_api.field_metadata.get(field) or {}
|
||||||
|
if fm.get('datatype') != 'composite':
|
||||||
ac = book_info.remove_item_action
|
ac = book_info.remove_item_action
|
||||||
ac.data = (field, remove_value, book_id)
|
ac.data = (field, remove_value, book_id)
|
||||||
ac.setText(_('Remove %s from this book') % escape_for_menu(remove_name or data.get('original_value') or value))
|
ac.setText(_('Remove %s from this book') % escape_for_menu(remove_name or data.get('original_value') or value))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user