From 0100ae743140edc68cfb1536244ed16da06af205 Mon Sep 17 00:00:00 2001 From: Abdo Date: Tue, 27 Jun 2023 09:52:34 +0300 Subject: [PATCH] Fix main window geometry/state not being restored in some cases (#2558) Introduced by 19b08eb280df18c4059606b3c24d3d0230db7c43 Report: https://forums.ankiweb.net/t/65-the-size-of-the-main-window-is-reset-every-time-it-is-closed-again/31364 --- qt/aqt/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index a9f984997..0bcbb2ea7 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -476,9 +476,8 @@ class AnkiQt(QMainWindow): self.setup_sound() self.flags = FlagManager(self) # show main window - if self.pm.profile.get("mainWindowState"): - restoreGeom(self, "mainWindow") - restoreState(self, "mainWindow") + restoreGeom(self, "mainWindow") + restoreState(self, "mainWindow") # titlebar self.setWindowTitle(f"{self.pm.name} - Anki") # show and raise window for osx