Skip to content

Commit 124ab99

Browse files
author
alexbruy
committed
use correct expand option when combobox items translated
git-svn-id: http://svn.osgeo.org/qgis/trunk@15078 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4762be0 commit 124ab99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/plugins/GdalTools/tools/doTranslate.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def __init__(self, iface):
1515
QWidget.__init__(self)
1616
self.iface = iface
1717
self.canvas = self.iface.mapCanvas()
18+
self.expand_method = ( 'gray', 'rgb', 'rgba' )
1819

1920
self.setupUi(self)
2021
BaseBatchWidget.__init__(self, self.iface, "gdal_translate")
@@ -188,7 +189,7 @@ def getArguments(self):
188189
arguments << self.outsizeSpin.text()
189190
if self.expandCheck.isChecked():
190191
arguments << "-expand"
191-
arguments << self.expandCombo.currentText().toLower()
192+
arguments << self.expand_method[self.expandCombo.currentIndex()]
192193
if self.nodataCheck.isChecked():
193194
arguments << "-a_nodata"
194195
arguments << str(self.nodataSpin.value())

0 commit comments

Comments
 (0)