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
  • Loading branch information
alexbruy authored and nyalldawson committed Dec 10, 2019
1 parent f37a759 commit dcdcb33
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 dcdcb33

Please sign in to comment.