Skip to content
Permalink
Browse files

[processing] improvements for modeler UI

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 e6f9499716e5cb3f8766ca2d2c5256d8faaf46c9
Showing with 6 additions and 2 deletions.
  1. +6 −2 python/plugins/processing/modeler/ModelerParametersDialog.py
@@ -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

@@ -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)

0 comments on commit e6f9499

Please sign in to comment.
You can’t perform that action at this time.