Fix main window geometry/state not being restored in some cases (#2558)

Introduced by 19b08eb280

Report: https://forums.ankiweb.net/t/65-the-size-of-the-main-window-is-reset-every-time-it-is-closed-again/31364
This commit is contained in:
Abdo 2023-06-27 09:52:34 +03:00 committed by GitHub
parent 9d4d6bd98b
commit 0100ae7431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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