Skip to content
Permalink
Browse files

[processing] Don't use separate label for checkbox parameters

Instead embed description as checkbox label.
  • Loading branch information
nyalldawson committed Jan 9, 2017
1 parent 632f9c5 commit 0f42ea781ab4204c3957b3875cdab65a0b450326
Showing with 15 additions and 6 deletions.
  1. +15 −6 python/plugins/processing/gui/ParametersPanel.py
@@ -123,15 +123,24 @@ def initWidgets(self):
tooltips = self.alg.getParameterDescriptions()
widget.setToolTip(tooltips.get(param.name, param.description))

label = QLabel(desc)
# label.setToolTip(tooltip)
self.labels[param.name] = label
if type(widget) is QCheckBox:
# checkbox widget - so description is embedded in widget rather than a separate
# label
widget.setText(desc)
else:
label = QLabel(desc)
# label.setToolTip(tooltip)
self.labels[param.name] = label

if param.isAdvanced:
self.layoutAdvanced.addWidget(label)
else:
self.layoutMain.insertWidget(
self.layoutMain.count() - 2, label)

if param.isAdvanced:
self.layoutAdvanced.addWidget(label)
self.layoutAdvanced.addWidget(widget)
else:
self.layoutMain.insertWidget(
self.layoutMain.count() - 2, label)
self.layoutMain.insertWidget(
self.layoutMain.count() - 2, widget)

0 comments on commit 0f42ea7

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