Skip to content
Permalink
Browse files

[processing] fix modeler parameter mandatory checkbox logic

  • Loading branch information
nirvn committed Oct 22, 2016
1 parent 3cc9b5d commit ddc44dfd89c27f6c3afeaa91dd298c8b1881e8c4
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/processing/modeler/ModelerParameterDefinitionDialog.py
@@ -226,7 +226,7 @@ def setupUi(self):
self.requiredCheck.setText(self.tr('Mandatory'))
self.requiredCheck.setChecked(True)
if self.param is not None:
self.requiredCheck.setChecked(self.param.optional)
self.requiredCheck.setChecked(not self.param.optional)
self.verticalLayout.addWidget(self.requiredCheck)

self.buttonBox = QDialogButtonBox(self)
@@ -325,7 +325,7 @@ def okPressed(self):
elif (self.paramType == ModelerParameterDefinitionDialog.PARAMETER_CRS or
isinstance(self.param, ParameterCrs)):
self.param = ParameterCrs(name, description, self.defaultTextBox.getValue())
self.param.optional = self.requiredCheck.isChecked()
self.param.optional = not self.requiredCheck.isChecked()
self.close()

def cancelPressed(self):

0 comments on commit ddc44df

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