ParameterTree: Fix custom context menu

This issue was introduced in merging develop into #1175.
While refactoring for the merge, the change in namespace was not
correctly attributed, leading to the parameter `opts` to be assumed
in local namespace when it isn't.
This commit is contained in:
2xB 2020-06-06 15:52:55 +02:00
parent ffc271d6c7
commit d86bb65520
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class ParameterItem(QtGui.QTreeWidgetItem):
self.contextMenu.addAction("Remove").triggered.connect(self.requestRemove)
# context menu
context = opts.get('context', None)
context = self.param.opts.get('context', None)
if isinstance(context, list):
for name in context:
self.contextMenu.addAction(name).triggered.connect(