Skip to content

Commit 414c3a4

Browse files
committed
Fix unavailable layer inputs for multi-layer inputs set to any map layer type
1 parent 54a99c2 commit 414c3a4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/plugins/processing/gui/wrappers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,9 @@ def createWidget(self):
608608
options = QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False)
609609
elif self.param.layerType() in (QgsProcessing.TypeVectorAnyGeometry, QgsProcessing.TypeVector):
610610
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
611+
elif self.param.layerType() == QgsProcessing.TypeMapLayer:
612+
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
613+
options.extend(QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False))
611614
else:
612615
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [self.param.layerType()],
613616
False)
@@ -627,6 +630,9 @@ def refresh(self):
627630
options = QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False)
628631
elif self.param.layerType() in (QgsProcessing.TypeVectorAnyGeometry, QgsProcessing.TypeVector):
629632
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
633+
elif self.param.layerType() == QgsProcessing.TypeMapLayer:
634+
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
635+
options.extend(QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False))
630636
else:
631637
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [self.param.layerType()],
632638
False)
@@ -667,6 +673,9 @@ def value(self):
667673
options = QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False)
668674
elif self.param.layerType() in (QgsProcessing.TypeVectorAnyGeometry, QgsProcessing.TypeVector):
669675
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
676+
elif self.param.layerType() == QgsProcessing.TypeMapLayer:
677+
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [], False)
678+
options.extend(QgsProcessingUtils.compatibleRasterLayers(QgsProject.instance(), False))
670679
else:
671680
options = QgsProcessingUtils.compatibleVectorLayers(QgsProject.instance(), [self.param.layerType()],
672681
False)

0 commit comments

Comments
 (0)