mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] fix modeler parameter mandatory checkbox logic
This commit is contained in:
parent
3cc9b5d962
commit
ddc44dfd89
@ -226,7 +226,7 @@ class ModelerParameterDefinitionDialog(QDialog):
|
|||||||
self.requiredCheck.setText(self.tr('Mandatory'))
|
self.requiredCheck.setText(self.tr('Mandatory'))
|
||||||
self.requiredCheck.setChecked(True)
|
self.requiredCheck.setChecked(True)
|
||||||
if self.param is not None:
|
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.verticalLayout.addWidget(self.requiredCheck)
|
||||||
|
|
||||||
self.buttonBox = QDialogButtonBox(self)
|
self.buttonBox = QDialogButtonBox(self)
|
||||||
@ -325,7 +325,7 @@ class ModelerParameterDefinitionDialog(QDialog):
|
|||||||
elif (self.paramType == ModelerParameterDefinitionDialog.PARAMETER_CRS or
|
elif (self.paramType == ModelerParameterDefinitionDialog.PARAMETER_CRS or
|
||||||
isinstance(self.param, ParameterCrs)):
|
isinstance(self.param, ParameterCrs)):
|
||||||
self.param = ParameterCrs(name, description, self.defaultTextBox.getValue())
|
self.param = ParameterCrs(name, description, self.defaultTextBox.getValue())
|
||||||
self.param.optional = self.requiredCheck.isChecked()
|
self.param.optional = not self.requiredCheck.isChecked()
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def cancelPressed(self):
|
def cancelPressed(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user