From 404c57bc59bedf9c1d09c3d15b9b8dc5ef0fe86f Mon Sep 17 00:00:00 2001 From: volaya Date: Tue, 20 Sep 2016 13:43:10 +0200 Subject: [PATCH] [processing] fixed table fields in batch processing interface Conflicts: python/plugins/processing/gui/BatchInputSelectionPanel.py --- python/plugins/processing/gui/BatchInputSelectionPanel.py | 5 +++-- python/plugins/processing/gui/wrappers.py | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/python/plugins/processing/gui/BatchInputSelectionPanel.py b/python/plugins/processing/gui/BatchInputSelectionPanel.py index 38671343d10..5b7c3a57399 100644 --- a/python/plugins/processing/gui/BatchInputSelectionPanel.py +++ b/python/plugins/processing/gui/BatchInputSelectionPanel.py @@ -114,7 +114,7 @@ class BatchInputSelectionPanel(QWidget): if dlg.selectedoptions is not None: selected = dlg.selectedoptions if len(selected) == 1: - self.text.setText(layers[selected[0]].name()) + self.setValue(layers[selected[0]]) else: if isinstance(self.param, ParameterMultipleInput): self.text.setText(';'.join(layers[idx].name() for idx in selected)) @@ -148,6 +148,7 @@ class BatchInputSelectionPanel(QWidget): files[i] = dataobjects.getRasterSublayer(filename, self.param) if len(files) == 1: self.text.setText(files[0]) + self.textEditingFinished() else: if isinstance(self.param, ParameterMultipleInput): self.text.setText(';'.join(str(f) for f in files)) @@ -170,6 +171,6 @@ class BatchInputSelectionPanel(QWidget): self._value = value if isinstance(value, QgsMapLayer): self.text.setText(value.name()) - else: #  should be basestring + else: # should be basestring self.text.setText(value) self.valueChanged.emit() diff --git a/python/plugins/processing/gui/wrappers.py b/python/plugins/processing/gui/wrappers.py index e8a20224341..edcfe40b66d 100644 --- a/python/plugins/processing/gui/wrappers.py +++ b/python/plugins/processing/gui/wrappers.py @@ -762,8 +762,6 @@ class TableFieldWidgetWrapper(WidgetWrapper): else: if self.dialogType in (DIALOG_STANDARD, DIALOG_BATCH): widget = QComboBox() - if self.dialogType == DIALOG_BATCH: - widget.setEditable(True) # Should be removed at the end return widget else: widget = QComboBox() @@ -778,7 +776,6 @@ class TableFieldWidgetWrapper(WidgetWrapper): def postInitialize(self, wrappers): for wrapper in wrappers: if wrapper.param.name == self.param.parent: - # self.refreshItems() if self.dialogType in (DIALOG_STANDARD, DIALOG_BATCH): self.setLayer(wrapper.value()) wrapper.widgetValueHasChanged.connect(self.parentValueChanged)