Skip to content

Commit

Permalink
[processing] Fix raster layers shown as inputs for certain vector algs
Browse files Browse the repository at this point in the history
Fixes #18148, #18149
  • Loading branch information
nyalldawson committed Feb 19, 2018
1 parent c07f37a commit fdebddd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/processing/gui/wrappers.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit fdebddd

Please sign in to comment.