From aada2e4864bfd67312474b70324126c542639f69 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 22 Dec 2010 01:14:35 +0900 Subject: [PATCH] force inMainWindow() to on, make sure win is visible --- ankiqt/ui/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index fb15928ac..a92b61620 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -909,6 +909,11 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") return True def inMainWindow(self): + if not self.app.activeWindow(): + # make sure window is shown + self.setWindowState(self.windowState() & ~Qt.WindowMinimized) + return True + # FIXME: no longer necessary? return self.app.activeWindow() == self def onNew(self, initial=False, path=None):