Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use active layer only if there is no default value
(cherry picked from commit dcdcb33)
  • Loading branch information
alexbruy authored and nyalldawson committed Dec 11, 2019
1 parent 142ca73 commit 59a50a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/processing/gui/wrappers.py
Expand Up @@ -939,7 +939,10 @@ def createWidget(self):
if self.parameterDefinition().flags() & QgsProcessingParameterDefinition.FlagOptional:
self.combo.setLayer(self.parameterDefinition().defaultValue())
else:
self.combo.setLayer(iface.activeLayer())
if self.parameterDefinition().defaultValue():
self.combo.setLayer(self.parameterDefinition().defaultValue())
else:
self.combo.setLayer(iface.activeLayer())
except:
pass

Expand Down

0 comments on commit 59a50a5

Please sign in to comment.