diff --git a/InitFeedsAndSpeeds.py b/InitFeedsAndSpeeds.py index 03c7ac0..1dd6105 100644 --- a/InitFeedsAndSpeeds.py +++ b/InitFeedsAndSpeeds.py @@ -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) @@ -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": @@ -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) \ No newline at end of file