[QGIS Commit] r15078 - trunk/qgis/python/plugins/GdalTools/tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Jan 25 13:55:59 EST 2011


Author: alexbruy
Date: 2011-01-25 10:55:59 -0800 (Tue, 25 Jan 2011)
New Revision: 15078

Modified:
   trunk/qgis/python/plugins/GdalTools/tools/doTranslate.py
Log:
use correct expand option when combobox items translated


Modified: trunk/qgis/python/plugins/GdalTools/tools/doTranslate.py
===================================================================
--- trunk/qgis/python/plugins/GdalTools/tools/doTranslate.py	2011-01-25 13:29:16 UTC (rev 15077)
+++ trunk/qgis/python/plugins/GdalTools/tools/doTranslate.py	2011-01-25 18:55:59 UTC (rev 15078)
@@ -15,6 +15,7 @@
       QWidget.__init__(self)
       self.iface = iface
       self.canvas = self.iface.mapCanvas()
+      self.expand_method = ( 'gray', 'rgb', 'rgba' )
 
       self.setupUi(self)
       BaseBatchWidget.__init__(self, self.iface, "gdal_translate")
@@ -188,7 +189,7 @@
               arguments << self.outsizeSpin.text()
       if self.expandCheck.isChecked():
           arguments << "-expand"
-          arguments << self.expandCombo.currentText().toLower()
+          arguments << self.expand_method[self.expandCombo.currentIndex()]
       if self.nodataCheck.isChecked():
           arguments << "-a_nodata"
           arguments << str(self.nodataSpin.value())



More information about the QGIS-commit mailing list