Skip to content
Permalink
Browse files

[processing] Fix raster layers shown as inputs for certain vector algs

Fixes #18148, #18149
  • Loading branch information
nyalldawson committed Feb 19, 2018
1 parent c07f37a commit fdebddd13aed6c769c7a4c8091e0c3850e0ecfef
Showing with 5 additions and 0 deletions.
  1. +5 −0 python/plugins/processing/gui/wrappers.py
@@ -974,6 +974,8 @@ def createWidget(self):
filters |= QgsMapLayerProxyModel.LineLayer
if QgsProcessing.TypeVectorPolygon in self.param.dataTypes():
filters |= QgsMapLayerProxyModel.PolygonLayer
if not filters:
filters = QgsMapLayerProxyModel.VectorLayer

try:
if iface.activeLayer().type() == QgsMapLayer.VectorLayer:
@@ -1282,6 +1284,9 @@ def createWidget(self):
filters |= QgsMapLayerProxyModel.LineLayer
if QgsProcessing.TypeVectorPolygon in self.param.dataTypes():
filters |= QgsMapLayerProxyModel.PolygonLayer
if not filters:
filters = QgsMapLayerProxyModel.VectorLayer

if filters:
self.combo.setFilters(filters)

0 comments on commit fdebddd

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