From 83585ca58cdf7d7ac7fcceb680dba55f8b0504fa Mon Sep 17 00:00:00 2001 From: Mazuricio Date: Wed, 15 May 2024 19:35:52 -0300 Subject: [PATCH] Add support for Ondsell --- InitFeedsAndSpeeds.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/InitFeedsAndSpeeds.py b/InitFeedsAndSpeeds.py index 03c7ac0..ef7abeb 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": @@ -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") @@ -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