Save profile when explicitly specified

Not just when any setting is modified...

fixes #1563
This commit is contained in:
Nicolas Werner 2023-11-01 06:20:44 +01:00
parent 092b12361e
commit 7823aceb58
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -147,6 +147,9 @@ UserSettings::load(std::optional<QString> profile)
settings.value("disable_certificate_validation", false).toBool(); settings.value("disable_certificate_validation", false).toBool();
applyTheme(); applyTheme();
if (profile)
setProfile(profile_);
} }
bool bool
@ -748,8 +751,7 @@ UserSettings::setScreenShareHideCursor(bool state)
void void
UserSettings::setProfile(QString profile) UserSettings::setProfile(QString profile)
{ {
if (profile == profile_) // always set this to allow setting this when loading and it is overwritten on the cli
return;
profile_ = profile; profile_ = profile;
emit profileChanged(profile_); emit profileChanged(profile_);
save(); save();