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:
Kovid Goyal 2016-12-29 09:22:48 +05:30
parent f173760722
commit 124a3d8011

View File

@ -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