From a265b71d36e462b85910ccecf2f1d9faab6f61eb Mon Sep 17 00:00:00 2001 From: glubsy Date: Wed, 28 Oct 2020 01:45:03 +0100 Subject: [PATCH] Improve comment reflecting modification of function --- qtlib/preferences.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qtlib/preferences.py b/qtlib/preferences.py index 7e3ba864..3f33705a 100644 --- a/qtlib/preferences.py +++ b/qtlib/preferences.py @@ -121,8 +121,10 @@ class Preferences(QObject): self._settings.setValue(name, normalize_for_serialization(value)) def saveGeometry(self, name, widget): - # We save geometry under a 5-sized int array: first item is a flag for whether the widget - # is maximized and the other 4 are (x, y, w, h). + # We save geometry under a 7-sized int array: first item is a flag + # for whether the widget is maximized, second item is a flag for whether + # the widget is docked, third item is a Qt::DockWidgetArea enum value, + # and the other 4 are (x, y, w, h). m = 1 if widget.isMaximized() else 0 d = 1 if isinstance(widget, QDockWidget) and not widget.isFloating() else 0 area = widget.parent.dockWidgetArea(widget) if d else 0