CAM: fix context menu callbacks for Qt6
This commit is contained in:
@@ -95,9 +95,12 @@ class ViewProvider(object):
|
||||
|
||||
edit = translate("Path", "Edit")
|
||||
action = QtGui.QAction(edit, menu)
|
||||
action.triggered.connect(self.setEdit)
|
||||
action.triggered.connect(self._editInContextMenuTriggered)
|
||||
menu.addAction(action)
|
||||
|
||||
def _editInContextMenuTriggered(self, checked):
|
||||
self.setEdit()
|
||||
|
||||
|
||||
_factory = {}
|
||||
|
||||
|
||||
@@ -345,9 +345,12 @@ class ViewProvider:
|
||||
for action in menu.actions():
|
||||
menu.removeAction(action)
|
||||
action = QtGui.QAction(translate("CAM_Job", "Edit"), menu)
|
||||
action.triggered.connect(self.setEdit)
|
||||
action.triggered.connect(self._editInContextMenuTriggered)
|
||||
menu.addAction(action)
|
||||
|
||||
def _editInContextMenuTriggered(self, checked):
|
||||
self.setEdit()
|
||||
|
||||
|
||||
class MaterialDialog(QtWidgets.QDialog):
|
||||
def __init__(self, parent=None):
|
||||
|
||||
@@ -187,9 +187,12 @@ class ViewProvider(object):
|
||||
for action in menu.actions():
|
||||
menu.removeAction(action)
|
||||
action = QtGui.QAction(translate("PathOp", "Edit"), menu)
|
||||
action.triggered.connect(self.setEdit)
|
||||
action.triggered.connect(self._editInContextMenuTriggered)
|
||||
menu.addAction(action)
|
||||
|
||||
def _editInContextMenuTriggered(self, checked):
|
||||
self.setEdit()
|
||||
|
||||
|
||||
class TaskPanelPage(object):
|
||||
"""Base class for all task panel pages."""
|
||||
|
||||
@@ -114,9 +114,12 @@ class ViewProvider:
|
||||
for action in menu.actions():
|
||||
menu.removeAction(action)
|
||||
action = QtGui.QAction(translate("CAM", "Edit"), menu)
|
||||
action.triggered.connect(self.setEdit)
|
||||
action.triggered.connect(self._editInContextMenuTriggered)
|
||||
menu.addAction(action)
|
||||
|
||||
def _editInContextMenuTriggered(self, checked):
|
||||
self.setEdit()
|
||||
|
||||
def claimChildren(self):
|
||||
obj = self.vobj.Object
|
||||
if obj and obj.Proxy and obj.Tool:
|
||||
|
||||
Reference in New Issue
Block a user