Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions FastenersCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,18 @@ def GetResources(self):
import GrammaticalTools

icon = os.path.join(iconPath, FSGetIconAlias(self.Type) + '.svg')

if FSParam.GetInt("ScrewToolbarGroupMode", 1) == 2:
menu_text = translate("FastenerCmd", "Add ") + GrammaticalTools.ToDativeCase(self.Help)
tooltip_text = "FS" + self.Type
else:
menu_text = translate("FastenerCmd", "Add ") + self.Type
tooltip_text = self.Help

return {'Pixmap': icon,
# the name of a svg file available in the resources
'MenuText': translate("FastenerCmd", "Add ") + GrammaticalTools.ToDativeCase(self.Help),
'ToolTip': self.Help}
'MenuText': menu_text,
'ToolTip': tooltip_text}

def Activated(self):
for selObj in FastenerBase.FSGetAttachableSelections():
Expand All @@ -882,7 +890,7 @@ def Activated(self):
a.ViewObject.LineWidth = FSParam.GetFloat("DefaultLineWidth", 1.0)
if FSParam.GetBool("DefaultVertexSizeActive", False):
a.ViewObject.PointSize = FSParam.GetFloat("DefaultVertexSize", 1.0)

FSViewProviderTree(a.ViewObject)
FreeCAD.ActiveDocument.recompute()
return
Expand Down