Skip to content

Commit 404c57b

Browse files
committedOct 5, 2016
[processing] fixed table fields in batch processing interface
Conflicts: python/plugins/processing/gui/BatchInputSelectionPanel.py
1 parent 23aec61 commit 404c57b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed
 

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def showLayerSelectionDialog(self):
114114
if dlg.selectedoptions is not None:
115115
selected = dlg.selectedoptions
116116
if len(selected) == 1:
117-
self.text.setText(layers[selected[0]].name())
117+
self.setValue(layers[selected[0]])
118118
else:
119119
if isinstance(self.param, ParameterMultipleInput):
120120
self.text.setText(';'.join(layers[idx].name() for idx in selected))
@@ -148,6 +148,7 @@ def showFileSelectionDialog(self):
148148
files[i] = dataobjects.getRasterSublayer(filename, self.param)
149149
if len(files) == 1:
150150
self.text.setText(files[0])
151+
self.textEditingFinished()
151152
else:
152153
if isinstance(self.param, ParameterMultipleInput):
153154
self.text.setText(';'.join(str(f) for f in files))
@@ -170,6 +171,6 @@ def setValue(self, value):
170171
self._value = value
171172
if isinstance(value, QgsMapLayer):
172173
self.text.setText(value.name())
173-
else: #  should be basestring
174+
else: # should be basestring
174175
self.text.setText(value)
175176
self.valueChanged.emit()

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,6 @@ def createWidget(self):
762762
else:
763763
if self.dialogType in (DIALOG_STANDARD, DIALOG_BATCH):
764764
widget = QComboBox()
765-
if self.dialogType == DIALOG_BATCH:
766-
widget.setEditable(True) # Should be removed at the end
767765
return widget
768766
else:
769767
widget = QComboBox()
@@ -778,7 +776,6 @@ def createWidget(self):
778776
def postInitialize(self, wrappers):
779777
for wrapper in wrappers:
780778
if wrapper.param.name == self.param.parent:
781-
# self.refreshItems()
782779
if self.dialogType in (DIALOG_STANDARD, DIALOG_BATCH):
783780
self.setLayer(wrapper.value())
784781
wrapper.widgetValueHasChanged.connect(self.parentValueChanged)

0 commit comments

Comments
 (0)
Please sign in to comment.