From 7823aceb58b5927c3674d08f475ef37fe0a43ec7 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 1 Nov 2023 06:20:44 +0100 Subject: [PATCH] Save profile when explicitly specified Not just when any setting is modified... fixes #1563 --- src/UserSettingsPage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 3de62116..0534b556 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -147,6 +147,9 @@ UserSettings::load(std::optional profile) settings.value("disable_certificate_validation", false).toBool(); applyTheme(); + + if (profile) + setProfile(profile_); } bool @@ -748,8 +751,7 @@ UserSettings::setScreenShareHideCursor(bool state) void UserSettings::setProfile(QString profile) { - if (profile == profile_) - return; + // always set this to allow setting this when loading and it is overwritten on the cli profile_ = profile; emit profileChanged(profile_); save();