mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] fixed table fields in batch processing interface
Conflicts: python/plugins/processing/gui/BatchInputSelectionPanel.py
This commit is contained in:
parent
23aec61501
commit
404c57bc59
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user