mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1842183 [calibre.exe uses CPU during idle with Download cover popup window open](https://bugs.launchpad.net/calibre/+bug/1842183)
This commit is contained in:
parent
8281ab4318
commit
0b03e331c2
@ -557,7 +557,7 @@ class IdentifyWidget(QWidget): # {{{
|
|||||||
class CoverWorker(Thread): # {{{
|
class CoverWorker(Thread): # {{{
|
||||||
|
|
||||||
def __init__(self, log, abort, title, authors, identifiers, caches):
|
def __init__(self, log, abort, title, authors, identifiers, caches):
|
||||||
Thread.__init__(self)
|
Thread.__init__(self, name='CoverWorker')
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
|
|
||||||
self.log, self.abort = log, abort
|
self.log, self.abort = log, abort
|
||||||
@ -813,6 +813,9 @@ class CoversView(QListView): # {{{
|
|||||||
self.select(0)
|
self.select(0)
|
||||||
self.delegate.start_animation()
|
self.delegate.start_animation()
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
self.delegate.stop_animation()
|
||||||
|
|
||||||
def reset_covers(self):
|
def reset_covers(self):
|
||||||
self.m.reset_covers()
|
self.m.reset_covers()
|
||||||
|
|
||||||
@ -937,6 +940,7 @@ class CoversWidget(QWidget): # {{{
|
|||||||
title=self.title)
|
title=self.title)
|
||||||
self.msg.setText(txt)
|
self.msg.setText(txt)
|
||||||
self.msg.setWordWrap(True)
|
self.msg.setWordWrap(True)
|
||||||
|
self.covers_view.stop()
|
||||||
|
|
||||||
self.finished.emit()
|
self.finished.emit()
|
||||||
|
|
||||||
@ -1193,7 +1197,8 @@ class CoverFetch(QDialog): # {{{
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
from calibre.gui2 import Application
|
||||||
DEBUG_DIALOG = True
|
DEBUG_DIALOG = True
|
||||||
app = QApplication([])
|
app = Application([])
|
||||||
d = FullFetch()
|
d = FullFetch()
|
||||||
d.start(title='great gatsby', authors=['fitzgerald'])
|
d.start(title='great gatsby', authors=['fitzgerald'], identifiers={})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user