From df00db28f629d8de63f7140c2e1b6b881144ac9c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Sep 2020 16:38:59 +0530 Subject: [PATCH] No need to use a larger than zero timeout for QV initialization --- src/calibre/gui2/ui.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 65ddf2a9f0..2f6b06896a 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -437,8 +437,9 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ # Once the gui is initialized we can restore the quickview state # The same thing will be true for any action-based operation with a - # layout button - QTimer.singleShot(20, self.start_quickview) + # layout button. We need to let a book be selected in the book list + # before initializing quickview, so run it after an event loop tick + QTimer.singleShot(0, self.start_quickview) def start_quickview(self): from calibre.gui2.actions.show_quickview import get_quickview_action_plugin