mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 04:27:13 +02:00
E-book viewer: Fix popup footnotes not working on windows
I forgot that QUrl.toLocalFile() uses the forward slash as the path separator on windows.
This commit is contained in:
parent
c98eb806f5
commit
1ccb71738b
1 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
|||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import json
|
||||
import json, os
|
||||
from collections import defaultdict
|
||||
|
||||
from PyQt5.Qt import (
|
||||
|
|
@ -123,10 +123,10 @@ def spine_path(self, path):
|
|||
pass
|
||||
|
||||
def get_footnote_data(self, a, qurl):
|
||||
current_path = unicode(self.view.document.mainFrame().baseUrl().toLocalFile())
|
||||
current_path = os.path.abspath(unicode(self.view.document.mainFrame().baseUrl().toLocalFile()))
|
||||
if not current_path:
|
||||
return # Not viewing a local file
|
||||
dest_path = self.spine_path(qurl.toLocalFile())
|
||||
dest_path = self.spine_path(os.path.abspath(unicode(qurl.toLocalFile())))
|
||||
if dest_path is not None:
|
||||
if dest_path == current_path:
|
||||
# We deliberately ignore linked to anchors if the destination is
|
||||
|
|
|
|||
Loading…
Reference in a new issue