From 1f6608aff0743cd5f87ba965232d0f716c928afc Mon Sep 17 00:00:00 2001
From: 0penBrain <48731257+0penBrain@users.noreply.github.com>
Date: Thu, 25 Nov 2021 15:00:59 +0100
Subject: [PATCH] [Gui] Decimal separator substitution : add option in
Preferences
---
src/Gui/DlgGeneral.ui | 18 +++++++++++++++++-
src/Gui/DlgGeneralImp.cpp | 2 ++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/Gui/DlgGeneral.ui b/src/Gui/DlgGeneral.ui
index 6e0f6c1fda..a48f1812f0 100644
--- a/src/Gui/DlgGeneral.ui
+++ b/src/Gui/DlgGeneral.ui
@@ -7,7 +7,7 @@
0
0
425
- 578
+ 767
@@ -89,6 +89,22 @@
+ -
+
+
+ If enabled, numerical keypad decimal separator will be substituted with locale separator
+
+
+ Substitute decimal separator (needs restart)
+
+
+ SubstituteDecimalSeparator
+
+
+ General
+
+
+
diff --git a/src/Gui/DlgGeneralImp.cpp b/src/Gui/DlgGeneralImp.cpp
index a1053da4dd..5052ea1a4e 100644
--- a/src/Gui/DlgGeneralImp.cpp
+++ b/src/Gui/DlgGeneralImp.cpp
@@ -140,6 +140,7 @@ void DlgGeneralImp::saveSettings()
App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
SetASCII("AutoloadModule", startWbName.toLatin1());
+ ui->SubstituteDecimal->onSave();
ui->RecentFiles->onSave();
ui->SplashScreen->onSave();
ui->PythonWordWrap->onSave();
@@ -204,6 +205,7 @@ void DlgGeneralImp::loadSettings()
QString startWbName = QLatin1String(start.c_str());
ui->AutoloadModuleCombo->setCurrentIndex(ui->AutoloadModuleCombo->findData(startWbName));
+ ui->SubstituteDecimal->onRestore();
ui->RecentFiles->onRestore();
ui->SplashScreen->onRestore();
ui->PythonWordWrap->onRestore();