Skip to content

Commit

Permalink
Show algorithm ID in tooltip in toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 30, 2017
1 parent 306b3fa commit e1ce7dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/plugins/processing/gui/ProcessingToolbox.py
Expand Up @@ -471,12 +471,18 @@ def __init__(self, alg):
name = alg.displayName()
name = name if name != '' else nameEn
self.setIcon(0, icon)
self.setToolTip(0, name)
self.setToolTip(0, self.formatAlgorithmTooltip(alg))
self.setText(0, name)
self.setData(0, ProcessingToolbox.NAME_ROLE, nameEn)
self.setData(0, ProcessingToolbox.TAG_ROLE, alg.tags())
self.setData(0, ProcessingToolbox.TYPE_ROLE, ProcessingToolbox.ALG_ITEM)

def formatAlgorithmTooltip(self, alg):
return '<p><b>{}</b></p><p>{}</p>'.format(
alg.displayName(),
QCoreApplication.translate('Toolbox','Algorithm ID: ‘{}’').format('<i>{}</i>'.format(alg.id()))
)


class TreeGroupItem(QTreeWidgetItem):

Expand Down

0 comments on commit e1ce7dd

Please sign in to comment.