mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
desktop: refresh date/time format when switching to system defaults
When switching to system defaults, refresh the fields in the preferences UI so that the user can tell how the fields will be formatted. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
757a4fa146
commit
fb1cf8d0e5
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue