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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user