Allowed actions to diplay title instead of name (#1069)

ActionParameterItem changed so that if there is
a title it will be displayed, otherwise displays name.
This commit is contained in:
rwalroth 2019-11-19 20:05:45 -08:00 committed by Ogi Moore
parent b1b2f4662b
commit 455fdc2a2a

View File

@ -612,7 +612,10 @@ class ActionParameterItem(ParameterItem):
self.layout = QtGui.QHBoxLayout()
self.layout.setContentsMargins(0, 0, 0, 0)
self.layoutWidget.setLayout(self.layout)
self.button = QtGui.QPushButton(param.name())
title = param.opts.get('title', None)
if title is None:
title = param.name()
self.button = QtGui.QPushButton(title)
#self.layout.addSpacing(100)
self.layout.addWidget(self.button)
self.layout.addStretch()