Viewer: Fix loading progress screen sometimes getting stuck if changing pages rapidly with mouse wheel. Fixes #1846751 [New Viewer App gets stuck at "Loading next section from … please wait…" when scrolling](https://bugs.launchpad.net/calibre/+bug/1846751)

This commit is contained in:
Kovid Goyal 2019-10-04 18:50:45 +05:30
parent 7ca2f68e53
commit f0b3091a18
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -482,6 +482,8 @@ class View:
def show_loading(self): def show_loading(self):
msg = _('Loading next section from <i>{title}</i>, please wait…').format(title=self.book.metadata.title) msg = _('Loading next section from <i>{title}</i>, please wait…').format(title=self.book.metadata.title)
if self.show_loading_callback_timer is not None:
clearTimeout(self.show_loading_callback_timer)
self.show_loading_callback_timer = setTimeout(self.show_loading_message.bind(None, msg), 200) self.show_loading_callback_timer = setTimeout(self.show_loading_message.bind(None, msg), 200)
def hide_loading(self): def hide_loading(self):