Arch: more consistent object naming and labelling

Following the example of Arch_Wall:
- Fixed object name.
- Default label is translatable.
- Name argument should only be used for the label and not be translated.
This commit is contained in:
Roy-043
2023-05-28 15:58:54 +02:00
parent 53c2a87bd3
commit 2986e91b6c
23 changed files with 107 additions and 103 deletions

View File

@@ -48,14 +48,14 @@ __url__ = "https://www.freecad.org"
# An axis system is a collection of multiple axes
def makeAxisSystem(axes,name="Axis System"):
def makeAxisSystem(axes,name=None):
'''makeAxisSystem(axes): makes a system from the given list of axes'''
'''makeAxisSystem(axes,[name]): makes a system from the given list of axes'''
if not isinstance(axes,list):
axes = [axes]
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython","AxisSystem")
obj.Label = translate("Arch",name)
obj.Label = name if name else translate("Arch","Axis System")
_AxisSystem(obj)
obj.Axes = axes
if FreeCAD.GuiUp: