mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Indentation
This commit is contained in:
parent
1a4a654f8b
commit
459244126f
@ -18,7 +18,6 @@
|
||||
"""
|
||||
from builtins import str
|
||||
|
||||
|
||||
__author__ = 'Victor Olaya'
|
||||
__date__ = 'August 2012'
|
||||
__copyright__ = '(C) 2012, Victor Olaya'
|
||||
@ -55,7 +54,6 @@ from processing.core.parameters import ParameterPoint, ParameterExtent
|
||||
|
||||
|
||||
class ModelerParametersDialog(QDialog):
|
||||
|
||||
ENTER_NAME = '[Enter name if this is a final result]'
|
||||
NOT_SELECTED = '[Not selected]'
|
||||
USE_MIN_COVERING_EXTENT = '[Use min covering extent]'
|
||||
@ -241,7 +239,8 @@ class ModelerParametersDialog(QDialog):
|
||||
if isinstance(param, t):
|
||||
if dataType is not None:
|
||||
if param.datatype in dataType:
|
||||
values.append(QgsProcessingModelAlgorithm.ChildParameterSource.fromModelParameter(param.name()))
|
||||
values.append(
|
||||
QgsProcessingModelAlgorithm.ChildParameterSource.fromModelParameter(param.name()))
|
||||
else:
|
||||
values.append(QgsProcessingModelAlgorithm.ChildParameterSource.fromModelParameter(param.name()))
|
||||
break
|
||||
@ -258,9 +257,13 @@ class ModelerParametersDialog(QDialog):
|
||||
for t in outTypes:
|
||||
if isinstance(out, t):
|
||||
if dataType is not None and out.datatype in dataType:
|
||||
values.append(QgsProcessingModelAlgorithm.ChildParameterSource.fromChildOutput(alg.childId(), out.name()))
|
||||
values.append(
|
||||
QgsProcessingModelAlgorithm.ChildParameterSource.fromChildOutput(alg.childId(),
|
||||
out.name()))
|
||||
else:
|
||||
values.append(QgsProcessingModelAlgorithm.ChildParameterSource.fromChildOutput(alg.childId(), out.name()))
|
||||
values.append(
|
||||
QgsProcessingModelAlgorithm.ChildParameterSource.fromChildOutput(alg.childId(),
|
||||
out.name()))
|
||||
|
||||
return values
|
||||
|
||||
@ -272,7 +275,8 @@ class ModelerParametersDialog(QDialog):
|
||||
return self.model.parameterDefinition(value.parameterName()).description()
|
||||
elif value.source() == QgsProcessingModelAlgorithm.ChildParameterSource.ChildOutput:
|
||||
alg = self.model.childAlgorithm(value.outputChildId())
|
||||
return self.tr("'{0}' from algorithm '{1}'").format(alg.algorithm().outputDefinition(value.outputName()).description(), alg.description())
|
||||
return self.tr("'{0}' from algorithm '{1}'").format(
|
||||
alg.algorithm().outputDefinition(value.outputName()).description(), alg.description())
|
||||
|
||||
return value
|
||||
|
||||
@ -307,8 +311,12 @@ class ModelerParametersDialog(QDialog):
|
||||
if param.isDestination() or param.flags() & QgsProcessingParameterDefinition.FlagHidden:
|
||||
continue
|
||||
val = self.wrappers[param.name()].value()
|
||||
if ( isinstance(val, QgsProcessingModelAlgorithm.ChildParameterSource) and val.source() == QgsProcessingModelAlgorithm.ChildParameterSource.StaticValue and not param.checkValueIsAcceptable(val.staticValue())) \
|
||||
or (not isinstance(val, QgsProcessingModelAlgorithm.ChildParameterSource) and not param.checkValueIsAcceptable(val)):
|
||||
if (isinstance(val,
|
||||
QgsProcessingModelAlgorithm.ChildParameterSource) and val.source() == QgsProcessingModelAlgorithm.ChildParameterSource.StaticValue and not param.checkValueIsAcceptable(
|
||||
val.staticValue())) \
|
||||
or (not isinstance(val,
|
||||
QgsProcessingModelAlgorithm.ChildParameterSource) and not param.checkValueIsAcceptable(
|
||||
val)):
|
||||
self.bar.pushMessage("Error", "Wrong or missing value for parameter '%s'" % param.description(),
|
||||
level=QgsMessageBar.WARNING)
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user