Skip to content
Permalink
Browse files

Fix unavailable layer inputs for multi-layer inputs set to any map la…

…yer type
  • Loading branch information
nyalldawson committed Feb 11, 2018
1 parent 54a99c2 commit 414c3a4bfea5ae61c4104206dcb506263619d6cc
Showing with 9 additions and 0 deletions.
  1. +9 −0 python/plugins/processing/gui/wrappers.py
@@ -608,6 +608,9 @@ def createWidget(self):
options = QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False)
elif self.param.layerType() in (QgsProcessing.TypeVectorAnyGeometry, QgsProcessing.TypeVector):
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
elif self.param.layerType() == QgsProcessing.TypeMapLayer:
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
options.extend(QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False))
else:
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [self.param.layerType()],
False)
@@ -627,6 +630,9 @@ def refresh(self):
options = QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False)
elif self.param.layerType() in (QgsProcessing.TypeVectorAnyGeometry, QgsProcessing.TypeVector):
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
elif self.param.layerType() == QgsProcessing.TypeMapLayer:
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
options.extend(QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False))
else:
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [self.param.layerType()],
False)
@@ -667,6 +673,9 @@ def value(self):
options = QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False)
elif self.param.layerType() in (QgsProcessing.TypeVectorAnyGeometry, QgsProcessing.TypeVector):
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
elif self.param.layerType() == QgsProcessing.TypeMapLayer:
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
options.extend(QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False))
else:
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [self.param.layerType()],
False)

0 comments on commit 414c3a4

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