Skip to content

Commit ddc44df

Browse files
committedOct 22, 2016
[processing] fix modeler parameter mandatory checkbox logic
1 parent 3cc9b5d commit ddc44df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎python/plugins/processing/modeler/ModelerParameterDefinitionDialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def setupUi(self):
226226
self.requiredCheck.setText(self.tr('Mandatory'))
227227
self.requiredCheck.setChecked(True)
228228
if self.param is not None:
229-
self.requiredCheck.setChecked(self.param.optional)
229+
self.requiredCheck.setChecked(not self.param.optional)
230230
self.verticalLayout.addWidget(self.requiredCheck)
231231

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

331331
def cancelPressed(self):

0 commit comments

Comments
 (0)
Please sign in to comment.