mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1839494 [Application crashes on changing icons](https://bugs.launchpad.net/calibre/+bug/1839494)
This commit is contained in:
parent
6042ed1dc5
commit
ab708af9da
@ -18,6 +18,10 @@ from PyQt5.Qt import (
|
|||||||
QGridLayout, QStyledItemDelegate, QApplication, QStaticText,
|
QGridLayout, QStyledItemDelegate, QApplication, QStaticText,
|
||||||
QStyle, QPen, QProgressDialog
|
QStyle, QPen, QProgressDialog
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
|
from PyQt5 import sip
|
||||||
|
except ImportError:
|
||||||
|
import sip
|
||||||
|
|
||||||
from calibre import walk, fit_image, human_readable, detect_ncpus as cpu_count
|
from calibre import walk, fit_image, human_readable, detect_ncpus as cpu_count
|
||||||
from calibre.constants import cache_dir, config_dir
|
from calibre.constants import cache_dir, config_dir
|
||||||
@ -689,6 +693,7 @@ class ChooseTheme(Dialog):
|
|||||||
import traceback
|
import traceback
|
||||||
self.themes = traceback.format_exc()
|
self.themes = traceback.format_exc()
|
||||||
t.join()
|
t.join()
|
||||||
|
if not sip.isdeleted(self):
|
||||||
self.themes_downloaded.emit()
|
self.themes_downloaded.emit()
|
||||||
|
|
||||||
def show_themes(self):
|
def show_themes(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user