Skip to content

Commit 24ea829

Browse files
author
volayaf
committedApr 17, 2012
show help button now appears only if a help file is available (#5388)
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@111 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent c85bfa7 commit 24ea829

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎src/sextante/gui/ParametersDialog.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ def setupUi(self, dialog, alg):
5656
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
5757
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
5858
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
59-
self.showHelpButton = QtGui.QPushButton()
60-
self.showHelpButton.setObjectName("showHelpButton")
61-
self.showHelpButton.setText("Show help")
62-
self.buttonBox.addButton(self.showHelpButton, QtGui.QDialogButtonBox.ActionRole)
59+
if self.alg.helpFile():
60+
self.showHelpButton = QtGui.QPushButton()
61+
self.showHelpButton.setObjectName("showHelpButton")
62+
self.showHelpButton.setText("Show help")
63+
self.buttonBox.addButton(self.showHelpButton, QtGui.QDialogButtonBox.ActionRole)
64+
QtCore.QObject.connect(self.showHelpButton, QtCore.SIGNAL("clicked()"), self.showHelp)
6365
self.tableWidget = QtGui.QTableWidget()
6466
self.tableWidget.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
6567
self.tableWidget.setColumnCount(2)
@@ -87,7 +89,6 @@ def setupUi(self, dialog, alg):
8789
dialog.setLayout(self.verticalLayout)
8890
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), self.accept)
8991
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), self.reject)
90-
QtCore.QObject.connect(self.showHelpButton, QtCore.SIGNAL("clicked()"), self.showHelp)
9192
QtCore.QMetaObject.connectSlotsByName(dialog)
9293

9394
def somethingDependsOnThisParameter(self, parent):

0 commit comments

Comments
 (0)
Please sign in to comment.