[Arch] Add Section plane context menu for CutView

Added Section plane context menu to toggle cutview property
This commit is contained in:
carlopav
2019-10-14 22:14:02 +02:00
committed by Yorik van Havre
parent cd37773d8e
commit c128ff999d

View File

@@ -1133,6 +1133,19 @@ class _ViewProviderSectionPlane:
self.setEdit(vobj,None)
def setupContextMenu(self,vobj,menu):
"""CONTEXT MENU setup"""
from PySide import QtCore,QtGui
action1 = QtGui.QAction(QtGui.QIcon(":/icons/Draft_Edit.svg"),"Toggle Cutview",menu)
action1.triggered.connect(lambda f=self.contextCutview, arg=vobj:f(arg))
menu.addAction(action1)
def contextCutview(self,vobj):
"""CONTEXT MENU command to toggle CutView property on and off"""
if vobj.CutView:
vobj.CutView = False
else: vobj.CutView = True
class _ArchDrawingView: