Browse Source

fix(ui): prevent text style from being reset during retranslation

Fixes #3805
pull/3860/head
initramfs 9 years ago
parent
commit
28c29157f8
No known key found for this signature in database
GPG Key ID: 3B6ECEC9C4DE199E
  1. 7
      src/widget/form/settings/userinterfaceform.cpp

7
src/widget/form/settings/userinterfaceform.cpp

@ -310,8 +310,15 @@ void UserInterfaceForm::on_themeColorCBox_currentIndexChanged(int) @@ -310,8 +310,15 @@ void UserInterfaceForm::on_themeColorCBox_currentIndexChanged(int)
*/
void UserInterfaceForm::retranslateUi()
{
// Block signals during translation to prevent settings change
RecursiveSignalBlocker signalBlocker{this};
bodyUI->retranslateUi(this);
// Restore text style index once translation is complete
bodyUI->textStyleComboBox->setCurrentIndex(
static_cast<int>(Settings::getInstance().getStylePreference()));
QStringList colorThemes(Style::getThemeColorNames());
for (int i = 0; i < colorThemes.size(); ++i)
{

Loading…
Cancel
Save