diff --git a/LunaTranslator/LunaTranslator/gui/dynalang.py b/LunaTranslator/LunaTranslator/gui/dynalang.py index 27d6f3ff..0b8c3645 100644 --- a/LunaTranslator/LunaTranslator/gui/dynalang.py +++ b/LunaTranslator/LunaTranslator/gui/dynalang.py @@ -107,7 +107,7 @@ class LCheckBox(QCheckBox, LBase): super().setText(_TR(self._text)) -class LGroupBox(QGroupBox, LBase): +class LGroupBox(QGroupBox): def __init__(self, *argc, **kwarg): super().__init__(*argc, **kwarg) @@ -122,7 +122,10 @@ class LGroupBox(QGroupBox, LBase): super().setTitle(_TR(self._text)) def changeEvent(self, e: QEvent): - super(LGroupBox, self).changeEvent(e) + if e.type() == QEvent.Type.LanguageChange: + self.updatelangtext() + super().changeEvent(e) + class LListWidgetItem(QListWidgetItem): def __init__(self, text): diff --git a/LunaTranslator/LunaTranslator/gui/usefulwidget.py b/LunaTranslator/LunaTranslator/gui/usefulwidget.py index 94f0de5e..3920012a 100644 --- a/LunaTranslator/LunaTranslator/gui/usefulwidget.py +++ b/LunaTranslator/LunaTranslator/gui/usefulwidget.py @@ -58,9 +58,6 @@ class LFocusCombo(FocusCombo, LBase): for i in range(self.count()): self.setItemText(i, _TR(self.__items[i])) - def changeEvent(self, e: QEvent): - super(LFocusCombo, self).changeEvent(e) - class FocusFontCombo(QFontComboBox, FocusCombo): pass