summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/preferences/preferences_language.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp
index 445970c27..f2519ef2c 100644
--- a/desktop-widgets/preferences/preferences_language.cpp
+++ b/desktop-widgets/preferences/preferences_language.cpp
@@ -90,6 +90,10 @@ void PreferencesLanguage::syncSettings()
qPrefLanguage::set_date_format_short(ui->shortDateFormatEntry->text());
initUiLanguage();
+ // When switching to system defaults, initUiLanguage() will reset the date and time formats.
+ // Therefore, refresh the UI fields to give the user a visual feedback of the new formats.
+ refreshSettings();
+
QString qDateTimeWeb = tr("These will be used as is. This might not be what you intended.\nSee http://doc.qt.io/qt-5/qdatetime.html#toString");
QRegExp tfillegalchars("[^hHmszaApPt\\s:;\\.,]");
if (tfillegalchars.indexIn(ui->timeFormatEntry->currentText()) >= 0)