pref: general: connect comboBox_UnitSystem manually. Fix System unit tooltip string

This commit is contained in:
Paddle
2023-04-01 16:29:59 +02:00
parent 805745599c
commit 0a5e85d6c7
3 changed files with 4 additions and 4 deletions

View File

@@ -80,7 +80,7 @@
<item row="1" column="1">
<widget class="QComboBox" name="comboBox_UnitSystem">
<property name="toolTip">
<string>Unit system that should be used for all parts the application</string>
<string>Unit system that should be used for all parts of the application</string>
</property>
</widget>
</item>

View File

@@ -83,6 +83,7 @@ DlgGeneralImp::DlgGeneralImp( QWidget* parent )
ui->RevertToSavedConfig->setEnabled(backups.empty());
connect(ui->RevertToSavedConfig, &QPushButton::clicked, this, &DlgGeneralImp::revertToSavedConfig);
connect(ui->comboBox_UnitSystem, qOverload<int>(&QComboBox::currentIndexChanged), this, &DlgGeneralImp::onUnitSystemIndexChanged);
ui->spinBoxDecimals->setMaximum(std::numeric_limits<double>::digits10 + 1);
int num = static_cast<int>(Base::UnitSystem::NumUnitSystemTypes);
@@ -536,8 +537,7 @@ void DlgGeneralImp::onLoadPreferencePackClicked(const std::string& packName)
}
}
void DlgGeneralImp::on_comboBox_UnitSystem_currentIndexChanged(int index)
void DlgGeneralImp::onUnitSystemIndexChanged(int index)
{
if (index < 0)
return; // happens when clearing the combo box in retranslateUi()

View File

@@ -65,7 +65,7 @@ protected Q_SLOTS:
void onImportConfigClicked();
public Q_SLOTS:
void on_comboBox_UnitSystem_currentIndexChanged(int index);
void onUnitSystemIndexChanged(int index);
private:
void setRecentFileSize();