PD: Retranslate InvoluteGear's Task Panel on language change

This makes use of the recent additions to `TaskPanelPython` and
`UiLoader`, cf. #8602, to retranslate the UI without having to close and
reopen it again.
Retranslation of the part from the UI file is now handled by FreeCAD
internally, but the tool tips from the property descriptions still need
to be reassigned with the translated versions.
This commit is contained in:
Jonas Bähr
2023-02-26 20:38:40 +01:00
committed by wwmayer
parent f51b2156f3
commit fb6fffa69f

View File

@@ -223,6 +223,10 @@ class _InvoluteGearTaskPanel:
assign("DedendumCoefficient", self.form.doubleSpinBox_Dedendum, self.form.label_Dedendum)
assign("RootFilletCoefficient", self.form.doubleSpinBox_RootFillet, self.form.label_RootFillet)
def changeEvent(self, event):
if event == QtCore.QEvent.LanguageChange:
self.assignToolTipsFromPropertyDocs()
def transferTo(self):
"Transfer from the dialog to the object"
self.obj.NumberOfTeeth = self.form.spinBox_NumberOfTeeth.value()