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, restoreState,
saveGeom, saveGeom,
saveSplitter, saveSplitter,
saveState,
showInfo, showInfo,
showWarning, showWarning,
tooltip, tooltip,
@ -437,8 +438,8 @@ class AnkiQt(QMainWindow):
self.unloadCollection(callback) self.unloadCollection(callback)
def _unloadProfile(self) -> None: def _unloadProfile(self) -> None:
self.pm.profile["mainWindowGeom"] = self.saveGeometry() saveGeom(self, "mainWindow")
self.pm.profile["mainWindowState"] = self.saveState() saveState(self, "mainWindow")
self.pm.save() self.pm.save()
self.hide() self.hide()