Skip to content

Commit

Permalink
Fix cut an object with a plane feature translation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kazan417 authored and yorikvanhavre committed Feb 28, 2019
1 parent b0d83f3 commit 979177d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Arch/ArchCutPlane.py
Expand Up @@ -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
Expand Down Expand Up @@ -98,7 +98,7 @@ def __init__(self):
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())

Expand All @@ -111,7 +111,7 @@ def accept(self):
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()
Expand Down

0 comments on commit 979177d

Please sign in to comment.