This commit is contained in:
Kovid Goyal 2024-02-04 09:19:53 +05:30
parent 90a0a33723
commit 3a4787577b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -609,7 +609,7 @@ class HTMLDisplay(QTextBrowser):
r = QIcon.icon_as_png(qurl.path().lstrip('/'), as_bytearray=True)
self.document().addResource(rtype, qurl, r)
return r
elif self.notes_resource_scheme and qurl.scheme() == self.notes_resource_scheme and int(rtype) == int(QTextDocument.ResourceType.ImageResource):
if self.notes_resource_scheme and qurl.scheme() == self.notes_resource_scheme and int(rtype) == int(QTextDocument.ResourceType.ImageResource):
from calibre.gui2.ui import get_gui
gui = get_gui()
if gui is not None: