summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-11-01 06:20:44 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-11-01 06:20:44 +0100
commit7823aceb58b5927c3674d08f475ef37fe0a43ec7 (patch)
tree86db660f4a4432b66d94a59033258be53f615646
parent092b12361e687ad64779b8842058035eb7f1b56d (diff)
Save profile when explicitly specified
Not just when any setting is modified... fixes #1563
-rw-r--r--src/UserSettingsPage.cpp6
1 files 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<QString> 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();