BIM: Only dusplay context menu items when in BIM WB - fixes #17043
This commit is contained in:
committed by
Chris Hennes
parent
40616bb119
commit
f4d213d299
@@ -84,6 +84,8 @@ class _ViewProviderArchMaterialContainer:
|
||||
self.Object = vobj.Object
|
||||
|
||||
def setupContextMenu(self, vobj, menu):
|
||||
if FreeCADGui.activeWorkbench().name() != 'BIMWorkbench':
|
||||
return
|
||||
actionMergeByName = QtGui.QAction(QtGui.QIcon(":/icons/Arch_Material_Group.svg"),
|
||||
translate("Arch", "Merge duplicates"),
|
||||
menu)
|
||||
@@ -360,6 +362,8 @@ class _ViewProviderArchMaterial:
|
||||
return True
|
||||
|
||||
def setupContextMenu(self, vobj, menu):
|
||||
if FreeCADGui.activeWorkbench().name() != 'BIMWorkbench':
|
||||
return
|
||||
actionEdit = QtGui.QAction(translate("Arch", "Edit"),
|
||||
menu)
|
||||
actionEdit.triggered.connect(self.edit)
|
||||
@@ -660,6 +664,8 @@ class _ViewProviderArchMultiMaterial:
|
||||
self.edit()
|
||||
|
||||
def setupContextMenu(self, vobj, menu):
|
||||
if FreeCADGui.activeWorkbench().name() != 'BIMWorkbench':
|
||||
return
|
||||
actionEdit = QtGui.QAction(translate("Arch", "Edit"),
|
||||
menu)
|
||||
actionEdit.triggered.connect(self.edit)
|
||||
|
||||
Reference in New Issue
Block a user