From 3446edb384f91961b93c326437bd9a70ba5d2d0d Mon Sep 17 00:00:00 2001 From: aa5sh <84428382+aa5sh@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:26:01 -0500 Subject: [PATCH] Fix for MacOS Layout Geometry Restore For MacOS the restore of the window geometry needs to occur after the window is shown. --- .gitignore | 2 ++ core/main.cpp | 4 +++- ui/MainWindow.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0d53acad..7fbb7d13 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ compile_commands.json # QtCreator local machine specific files for imported projects *creator.user* +.DS_Store +/build diff --git a/core/main.cpp b/core/main.cpp index 57f79eb3..e7bb75e3 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -562,6 +562,8 @@ int main(int argc, char* argv[]) w.setWindowIcon(icon); w.show(); - +#ifdef Q_OS_OSX + w.setLayoutGeometry(); +#endif return app.exec(); } diff --git a/ui/MainWindow.h b/ui/MainWindow.h index d458d71a..19622f74 100644 --- a/ui/MainWindow.h +++ b/ui/MainWindow.h @@ -42,6 +42,7 @@ public slots: void rotErrorHandler(const QString &error, const QString &errorDetail); void cwKeyerErrorHandler(const QString &error, const QString &errorDetail); void stationProfileChanged(); + void setLayoutGeometry(); private slots: void rigConnect(); @@ -75,7 +76,7 @@ private slots: void shortcutALTBackslash(); void setManualContact(bool); void showEditLayout(); - void setLayoutGeometry(); + void saveProfileLayoutGeometry(); void setEquipmentKeepOptions(bool);