Skip to content

Commit

Permalink
show help button now appears only if a help file is available (#5388)
Browse files Browse the repository at this point in the history
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@111 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed Apr 17, 2012
1 parent c85bfa7 commit 24ea829
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sextante/gui/ParametersDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ def setupUi(self, dialog, alg):
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.showHelpButton = QtGui.QPushButton()
self.showHelpButton.setObjectName("showHelpButton")
self.showHelpButton.setText("Show help")
self.buttonBox.addButton(self.showHelpButton, QtGui.QDialogButtonBox.ActionRole)
if self.alg.helpFile():
self.showHelpButton = QtGui.QPushButton()
self.showHelpButton.setObjectName("showHelpButton")
self.showHelpButton.setText("Show help")
self.buttonBox.addButton(self.showHelpButton, QtGui.QDialogButtonBox.ActionRole)
QtCore.QObject.connect(self.showHelpButton, QtCore.SIGNAL("clicked()"), self.showHelp)
self.tableWidget = QtGui.QTableWidget()
self.tableWidget.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
self.tableWidget.setColumnCount(2)
Expand Down Expand Up @@ -87,7 +89,6 @@ def setupUi(self, dialog, alg):
dialog.setLayout(self.verticalLayout)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), self.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), self.reject)
QtCore.QObject.connect(self.showHelpButton, QtCore.SIGNAL("clicked()"), self.showHelp)
QtCore.QMetaObject.connectSlotsByName(dialog)

def somethingDependsOnThisParameter(self, parent):
Expand Down

0 comments on commit 24ea829

Please sign in to comment.