mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix #2090888 [id_to_index failure during metadata edit](https://bugs.launchpad.net/calibre/+bug/2090888)
This commit is contained in:
parent
2aa51fa422
commit
daef0914cd
@ -232,7 +232,7 @@ class View:
|
||||
try:
|
||||
return self._real_map_filtered_id_to_row[book_id]
|
||||
except KeyError:
|
||||
raise ValueError(f'No such book_id {book_id}')
|
||||
raise ValueError(f'No such book_id {book_id} in current view')
|
||||
row = index_to_id
|
||||
|
||||
def index(self, book_id, cache=False):
|
||||
|
@ -506,8 +506,7 @@ class EditMetadataAction(InterfaceActionWithLibraryDrop):
|
||||
if id_ is None:
|
||||
view._view_file(fmt)
|
||||
else:
|
||||
db = self.gui.library_view.model().db
|
||||
view.view_format(db.row(id_), fmt)
|
||||
view.view_format_by_id(id_, fmt)
|
||||
|
||||
def edit_format_callback(self, id_, fmt):
|
||||
edit = self.gui.iactions['Tweak ePub']
|
||||
|
Loading…
x
Reference in New Issue
Block a user