Skip to content

Commit

Permalink
[processing] improvements for modeler UI
Browse files Browse the repository at this point in the history
Do not show help tab if there is no help

add "optional" tag for optional parameters
  • Loading branch information
volaya committed Oct 5, 2016
1 parent a968fa3 commit e6f9499
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/plugins/processing/modeler/ModelerParametersDialog.py
Expand Up @@ -141,6 +141,8 @@ def setupUi(self):
desc += self.tr('(xmin, xmax, ymin, ymax)')
if isinstance(param, ParameterPoint):
desc += self.tr('(x, y)')
if param.optional:
desc += self.tr(' [optional]')
label = QLabel(desc)
self.labels[param.name] = label

Expand Down Expand Up @@ -213,12 +215,14 @@ def setupUi(self):
else:
html = self.tr('<p>Downloading algorithm help... Please wait.</p>')
self.txtHelp.setHtml(html)
self.tabWidget.addTab(self.txtHelp, 'Help')
self.reply = QgsNetworkAccessManager.instance().get(QNetworkRequest(algHelp))
self.reply.finished.connect(self.requestFinished)
except:
self.txtHelp.setHtml(self.tr('<h2>No help available for this algorithm</h2>'))
pass



self.tabWidget.addTab(self.txtHelp, 'Help')

self.verticalLayout2.addWidget(self.tabWidget)
self.verticalLayout2.addWidget(self.buttonBox)
Expand Down

0 comments on commit e6f9499

Please sign in to comment.