Use save utils in main window (#1549)

Ensure additional logic like the fullscreen workaround is considered.
This commit is contained in:
RumovZ 2021-12-13 05:10:24 +01:00 committed by GitHub
parent cc5ba4ed84
commit 5b2a389454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,6 +65,7 @@ from aqt.utils import (
restoreState,
saveGeom,
saveSplitter,
saveState,
showInfo,
showWarning,
tooltip,
@ -437,8 +438,8 @@ class AnkiQt(QMainWindow):
self.unloadCollection(callback)
def _unloadProfile(self) -> None:
self.pm.profile["mainWindowGeom"] = self.saveGeometry()
self.pm.profile["mainWindowState"] = self.saveState()
saveGeom(self, "mainWindow")
saveState(self, "mainWindow")
self.pm.save()
self.hide()