mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Return a null pixmap rather than failing
This commit is contained in:
parent
06432e4eee
commit
9cd8e43040
@ -1305,8 +1305,7 @@ class Application(QApplication):
|
|||||||
@lru_cache(maxsize=256)
|
@lru_cache(maxsize=256)
|
||||||
def cached_qpixmap(self, name):
|
def cached_qpixmap(self, name):
|
||||||
ic = QIcon.ic(name)
|
ic = QIcon.ic(name)
|
||||||
pmap = ic.pixmap(ic.availableSizes()[0])
|
return ic.pixmap((ic.availableSizes() or (256,))[0])
|
||||||
return pmap
|
|
||||||
|
|
||||||
def on_palette_change(self):
|
def on_palette_change(self):
|
||||||
self.cached_qimage.cache_clear()
|
self.cached_qimage.cache_clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user