[Gui] Decimal separator substitution : add option in Preferences

This commit is contained in:
0penBrain
2021-11-25 15:00:59 +01:00
committed by Uwe
parent 3b9dfeb672
commit 1f6608aff0
2 changed files with 19 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>425</width>
<height>578</height>
<height>767</height>
</rect>
</property>
<property name="windowTitle">
@@ -89,6 +89,22 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="Gui::PrefCheckBox" name="SubstituteDecimal">
<property name="toolTip">
<string>If enabled, numerical keypad decimal separator will be substituted with locale separator</string>
</property>
<property name="text">
<string>Substitute decimal separator (needs restart)</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>SubstituteDecimalSeparator</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>General</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@@ -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();