mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 17:54:55 +02: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
1 changed files with 4 additions and 1 deletions
|
|
@ -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 @@ def headerData(self, section, orientation, role=Qt.DisplayRole):
|
|||
def location(self, index):
|
||||
try:
|
||||
return self.files[index.row()].name
|
||||
except IndexError:
|
||||
except (IndexError, AttributeError):
|
||||
pass
|
||||
|
||||
|
||||
|
|
@ -350,6 +351,7 @@ def __call__(self, key, locations):
|
|||
loc = locations[self.pos_map[key]]
|
||||
jump_to_location(loc)
|
||||
|
||||
|
||||
jump = Jump() # }}}
|
||||
|
||||
# Images {{{
|
||||
|
|
@ -1441,6 +1443,7 @@ def reject(self):
|
|||
Dialog.reject(self)
|
||||
# }}}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from calibre.gui2 import Application
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Reference in a new issue