No need to use a larger than zero timeout for QV initialization

This commit is contained in:
Kovid Goyal 2020-09-03 16:38:59 +05:30
parent 44a582bcaf
commit df00db28f6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -437,8 +437,9 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
# Once the gui is initialized we can restore the quickview state # Once the gui is initialized we can restore the quickview state
# The same thing will be true for any action-based operation with a # The same thing will be true for any action-based operation with a
# layout button # layout button. We need to let a book be selected in the book list
QTimer.singleShot(20, self.start_quickview) # before initializing quickview, so run it after an event loop tick
QTimer.singleShot(0, self.start_quickview)
def start_quickview(self): def start_quickview(self):
from calibre.gui2.actions.show_quickview import get_quickview_action_plugin from calibre.gui2.actions.show_quickview import get_quickview_action_plugin