Skip to content

Commit d8302a2

Browse files
committedJun 12, 2017
Fix feature source widget returns source even when not set
1 parent c52e6a7 commit d8302a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎python/plugins/processing/gui/wrappers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,10 @@ def value(self):
869869
if layer:
870870
return QgsProcessingFeatureSourceDefinition(layer.id(), use_selected_features)
871871
else:
872-
return QgsProcessingFeatureSourceDefinition(self.combo.currentText(), use_selected_features)
872+
if self.combo.currentText():
873+
return QgsProcessingFeatureSourceDefinition(self.combo.currentText(), use_selected_features)
874+
else:
875+
return None
873876
except:
874877
return QgsProcessingFeatureSourceDefinition(self.combo.currentText(), use_selected_features)
875878
elif self.dialogType == DIALOG_BATCH:

0 commit comments

Comments
 (0)
Please sign in to comment.