mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fixed #6571
This commit is contained in:
parent
98658ef29b
commit
3b886372fe
@ -53,6 +53,11 @@ class MultipleInputPanel(QtGui.QWidget):
|
||||
self.horizontalLayout.addWidget(self.pushButton)
|
||||
self.setLayout(self.horizontalLayout)
|
||||
|
||||
def setSelectedItems(self, selected):
|
||||
#no checking is performed!
|
||||
self.selectedoptions = selected
|
||||
self.label.setText(str(len(self.selectedoptions)) + " elements selected")
|
||||
|
||||
def showSelectionDialog(self):
|
||||
#If there is a datatype, we use it to create the list of options
|
||||
if self.datatype is not None:
|
||||
|
@ -87,7 +87,7 @@ class ModelerParameterDefinitionDialog(QtGui.QDialog):
|
||||
self.horizontalLayout3.setMargin(0)
|
||||
|
||||
if isinstance(self.param, Parameter):
|
||||
self.nameTextBox.setText(self.param.name)
|
||||
self.nameTextBox.setText(self.param.description)
|
||||
|
||||
if self.paramType == ModelerParameterDefinitionDialog.PARAMETER_BOOLEAN or \
|
||||
isinstance(self.param, ParameterBoolean):
|
||||
|
@ -510,7 +510,19 @@ class ModelerParametersDialog(QtGui.QDialog):
|
||||
elif isinstance(param, ParameterFixedTable):
|
||||
pass
|
||||
elif isinstance(param, ParameterMultipleInput):
|
||||
pass
|
||||
value = self.model.getValueFromAlgorithmAndParameter(value)
|
||||
values = value.split(";")
|
||||
selectedoptions = []
|
||||
if param.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
|
||||
options = self.getVectorLayers()
|
||||
else:
|
||||
options = self.getRasterLayers()
|
||||
for i in range(len(options)):
|
||||
option = options[i]
|
||||
for aap in (values):
|
||||
if str(option) == aap:
|
||||
selectedoptions.append(i)
|
||||
widget.setSelectedItems(selectedoptions)
|
||||
else:
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user