Skip to content

Commit

Permalink
[processing] fixed table fields in batch processing interface
Browse files Browse the repository at this point in the history
Conflicts:
	python/plugins/processing/gui/BatchInputSelectionPanel.py
  • Loading branch information
volaya committed Oct 5, 2016
1 parent 23aec61 commit 404c57b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/gui/BatchInputSelectionPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def showLayerSelectionDialog(self):
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))
Expand Down Expand Up @@ -148,6 +148,7 @@ def showFileSelectionDialog(self):
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))
Expand All @@ -170,6 +171,6 @@ def setValue(self, value):
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()
3 changes: 0 additions & 3 deletions python/plugins/processing/gui/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,6 @@ def createWidget(self):
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()
Expand All @@ -778,7 +776,6 @@ def createWidget(self):
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)
Expand Down

0 comments on commit 404c57b

Please sign in to comment.