Skip to content

Commit

Permalink
[processing] Implement a todo (set layer param's wrapper values)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 21, 2017
1 parent 1f6d1a6 commit 595b981
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions python/plugins/processing/gui/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,13 @@ def selectFile(self):

def setValue(self, value):
if self.dialogType == DIALOG_STANDARD:
pass # TODO
if self.combo.findText(value) >= 0:
self.combo.setCurrentIndex(self.combo.findText(value))
else:
items = self.combo.additionalItems()
items.append(value)
self.combo.setAdditionalItems(items)
self.combo.setCurrentIndex(self.combo.findText(value))
elif self.dialogType == DIALOG_BATCH:
self.widget.setText(value)
else:
Expand Down Expand Up @@ -985,7 +991,13 @@ def selectFile(self):

def setValue(self, value):
if self.dialogType == DIALOG_STANDARD:
pass # TODO
if self.combo.findText(value) >= 0:
self.combo.setCurrentIndex(self.combo.findText(value))
else:
items = self.combo.additionalItems()
items.append(value)
self.combo.setAdditionalItems(items)
self.combo.setCurrentIndex(self.combo.findText(value))
elif self.dialogType == DIALOG_BATCH:
self.widget.setValue(value)
else:
Expand Down Expand Up @@ -1262,7 +1274,13 @@ def selectFile(self):

def setValue(self, value):
if self.dialogType == DIALOG_STANDARD:
pass # TODO
if self.combo.findText(value) >= 0:
self.combo.setCurrentIndex(self.combo.findText(value))
else:
items = self.combo.additionalItems()
items.append(value)
self.combo.setAdditionalItems(items)
self.combo.setCurrentIndex(self.combo.findText(value))
elif self.dialogType == DIALOG_BATCH:
return self.widget.setText(value)
else:
Expand Down

0 comments on commit 595b981

Please sign in to comment.