From 801e796b93fa1abf1d05fc7a7698c28f9c8f3abc Mon Sep 17 00:00:00 2001 From: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com> Date: Fri, 5 Feb 2021 20:32:26 +0300 Subject: [PATCH] SYNERGY-677 Common settings should always be saved. (#6936) * SYNERGY-677 Application loses settings * SYNERGY-677 Update ChangeLog * SYNERGY-677 Code smells fix. * SYNERGY-677 Don't save settings into memory if the file is not writable. * SYNERGY-677 Update ChangeLog * SYNERGY-677 Common settings should be saved in any case. * SYNERGY-677 Update ChangeLog --- ChangeLog | 2 +- src/gui/src/AppConfig.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7550aa49..7fb1fc99e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,7 @@ Bug fixes: - #6921 Handling pre-main window creation status notifications - #6922 macOS CI build - #6927 Text copied and pasted between Windows and Mac OS converts to japanese -- #6935 Application loses settings +- #6936 Application loses settings Enhancements: - #6912 Removes UI for Screen Saver Sync and Files Drag and Drop diff --git a/src/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp index 084747022..b4d68b429 100644 --- a/src/gui/src/AppConfig.cpp +++ b/src/gui/src/AppConfig.cpp @@ -263,9 +263,10 @@ void AppConfig::loadSettings() void AppConfig::saveSettings() { + setCommonSetting(kWizardLastRun, kWizardVersion); + setCommonSetting(kLoadSystemSettings, m_LoadFromSystemScope); + if (isWritable()) { - setCommonSetting(kWizardLastRun, kWizardVersion); - setCommonSetting(kLoadSystemSettings, m_LoadFromSystemScope); setSetting(kScreenName, m_ScreenName); setSetting(kPort, m_Port); setSetting(kInterfaceSetting, m_Interface);