mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
93f98ee19c
commit
99eb7bf591
@ -507,6 +507,10 @@ class EbookViewer(MainWindow, Ui_EbookViewer):
|
||||
def toc_clicked(self, index):
|
||||
item = self.toc_model.itemFromIndex(index)
|
||||
if item.abspath is not None:
|
||||
if not os.path.exists(item.abspath):
|
||||
return error_dialog(self, _('No such location'),
|
||||
_('The location pointed to by this item'
|
||||
' does not exist.'), show=True)
|
||||
url = QUrl.fromLocalFile(item.abspath)
|
||||
if item.fragment:
|
||||
url.setFragment(item.fragment)
|
||||
|
Loading…
x
Reference in New Issue
Block a user