Minor refactoring

This commit is contained in:
Sergio Martins
2021-05-17 22:13:17 +01:00
parent 70ecdaf54c
commit bd985781b9
2 changed files with 8 additions and 2 deletions

View File

@@ -690,7 +690,7 @@ LayoutSaver::MainWindow MainWindowBase::serialize() const
LayoutSaver::MainWindow m;
m.options = options();
m.geometry = window()->geometry(); // window() as the MainWindow can be embedded
m.geometry = windowGeometry();
m.isVisible = isVisible();
m.uniqueName = uniqueName();
m.screenIndex = screenNumberForWidget(this);
@@ -710,3 +710,9 @@ LayoutSaver::MainWindow MainWindowBase::serialize() const
return m;
}
QRect MainWindowBase::windowGeometry() const
{
// Usually the same as geometry(), unless the this main window is embedded
return window()->geometry();
}