mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Reports tool: Fix an error when right clicking on items in the Links view. See #1652960 (Download external resources)
This commit is contained in:
parent
f173760722
commit
124a3d8011
@ -56,6 +56,7 @@ def save_state(name, val):
|
||||
tprefs['reports-ui-state'] = data = {}
|
||||
data[name] = val
|
||||
|
||||
|
||||
SORT_ROLE = Qt.UserRole + 1
|
||||
|
||||
|
||||
@ -111,7 +112,7 @@ class FileCollection(QAbstractTableModel):
|
||||
def location(self, index):
|
||||
try:
|
||||
return self.files[index.row()].name
|
||||
except IndexError:
|
||||
except (IndexError, AttributeError):
|
||||
pass
|
||||
|
||||
|
||||
@ -350,6 +351,7 @@ class Jump(object):
|
||||
loc = locations[self.pos_map[key]]
|
||||
jump_to_location(loc)
|
||||
|
||||
|
||||
jump = Jump() # }}}
|
||||
|
||||
# Images {{{
|
||||
@ -1441,6 +1443,7 @@ class Reports(Dialog):
|
||||
Dialog.reject(self)
|
||||
# }}}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from calibre.gui2 import Application
|
||||
import sys
|
||||
|
Loading…
x
Reference in New Issue
Block a user