mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
Fixes #2035039 [Quickview window opens in the background](https://bugs.launchpad.net/calibre/+bug/2035039)
This commit is contained in:
commit
97ecdad95e
@ -6,7 +6,7 @@ __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
|
||||
from qt.core import QAction
|
||||
from qt.core import QAction, QTimer
|
||||
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.gui2.dialogs.quickview import Quickview
|
||||
@ -171,6 +171,10 @@ class ShowQuickviewAction(InterfaceAction):
|
||||
if show or (self.current_instance and not self.current_instance.is_closed):
|
||||
self.focus_quickview()
|
||||
self.current_instance.slave(idx)
|
||||
# This is needed because if this method is invoked from the library
|
||||
# view header context menu, the library view takes back the focus. I
|
||||
# don't know if this happens for any context menu.
|
||||
QTimer.singleShot(0, self.current_instance.set_focus)
|
||||
|
||||
def library_changed(self, db):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user