Skip to content

Commit

Permalink
Add support for Ondsell
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazuricio committed May 15, 2024
1 parent b2cc013 commit 83585ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions InitFeedsAndSpeeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def getIcon(iconName):

def updateMenu(workbench):

if workbench == 'PathWorkbench':
if workbench == 'PathWorkbench' or workbench == 'CAMWorkbench' :

print('Feeds and Speeds Addon loaded:', workbench)

Expand All @@ -44,6 +44,8 @@ def updateMenu(workbench):

# Find the main path menu
pathMenu = mw.findChild(QtGui.QMenu, "&Path")
if pathMenu is None:
pathMenu = mw.findChild(QtGui.QMenu, "&CAM")

for menu in pathMenu.actions():
if menu.text() == "Path Addons":
Expand All @@ -53,7 +55,7 @@ def updateMenu(workbench):

if addonMenu is None:
addonMenu = QtGui.QMenu("Path Addons")
addonMenu.setObjectName("Path_Addons")
addonMenu = QtGui.QMenu("Path Addons")

# Find the dressup menu entry
dressupMenu = mw.findChild(QtGui.QMenu, "Path Dressup")
Expand All @@ -71,4 +73,4 @@ def updateMenu(workbench):
# append this addon to addon menu
addonMenu.addAction(action)

FreeCADGui.getMainWindow().workbenchActivated.connect(updateMenu)
FreeCADGui.getMainWindow().workbenchActivated.connect(updateMenu)

0 comments on commit 83585ca

Please sign in to comment.