From 6a9fbb1d1a2c3bcd2204399d8e59e442222925ab Mon Sep 17 00:00:00 2001 From: kazan417 Date: Wed, 27 Feb 2019 22:05:10 +0700 Subject: [PATCH] Fix cut an object with a plane feature translation Fix not worked translation for cut an object with a plane feature in arch module. Without this fix cut an object with a plane does not work in languages different to English. Similar bugs was fixed earlier, but this was harder to find because of initially grayed out feature. --- src/Mod/Arch/ArchCutPlane.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Arch/ArchCutPlane.py b/src/Mod/Arch/ArchCutPlane.py index 4d897c2e5f..90d2cedf23 100644 --- a/src/Mod/Arch/ArchCutPlane.py +++ b/src/Mod/Arch/ArchCutPlane.py @@ -51,14 +51,14 @@ def cutComponentwithPlane(archObject, cutPlane, sideFace): else: cutVolume = cutVolume[1] if cutVolume: - obj = FreeCAD.ActiveDocument.addObject("Part::Feature", str(translate("Arch","CutVolume"))) + obj = FreeCAD.ActiveDocument.addObject("Part::Feature","CutVolume") obj.Shape = cutVolume obj.ViewObject.ShapeColor = (1.00,0.00,0.00) obj.ViewObject.Transparency = 75 if "Additions" in archObject.Object.PropertiesList: return ArchCommands.removeComponents(obj,archObject.Object) else: - cutObj = FreeCAD.ActiveDocument.addObject("Part::Cut", str(translate("Arch","CutPlane"))) + cutObj = FreeCAD.ActiveDocument.addObject("Part::Cut","CutPlane") cutObj.Base = archObject.Object cutObj.Tool = obj return cutObj @@ -98,7 +98,7 @@ class _CutPlaneTaskPanel: self.combobox.setCurrentIndex(0) self.grid.addWidget(self.combobox, 2, 1) QtCore.QObject.connect(self.combobox,QtCore.SIGNAL("currentIndexChanged(int)"),self.previewCutVolume) - self.previewObj = FreeCAD.ActiveDocument.addObject("Part::Feature", str(translate("Arch", "PreviewCutVolume"))) + self.previewObj = FreeCAD.ActiveDocument.addObject("Part::Feature","PreviewCutVolume") self.retranslateUi(self.form) self.previewCutVolume(self.combobox.currentIndex()) @@ -111,7 +111,7 @@ class _CutPlaneTaskPanel: s = FreeCADGui.Selection.getSelectionEx() if len(s) > 1: if s[1].SubObjects: - FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Cutting"))) + FreeCAD.ActiveDocument.openTransaction(translate("Arch","Cutting")) FreeCADGui.addModule("Arch") FreeCADGui.doCommand("Arch.cutComponentwithPlane(FreeCADGui.Selection.getSelectionEx()[0],FreeCADGui.Selection.getSelectionEx()[1].SubObjects[0],"+ str(val) +")") FreeCAD.ActiveDocument.commitTransaction()