[QGIS Commit] r13859 - trunk/qgis/python/plugins/fTools/tools
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jun 30 18:49:20 EDT 2010
Author: cfarmer
Date: 2010-06-30 22:49:20 +0000 (Wed, 30 Jun 2010)
New Revision: 13859
Modified:
trunk/qgis/python/plugins/fTools/tools/doRandom.py
Log:
patch from alex to fix #2735
Modified: trunk/qgis/python/plugins/fTools/tools/doRandom.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doRandom.py 2010-06-30 21:11:31 UTC (rev 13858)
+++ trunk/qgis/python/plugins/fTools/tools/doRandom.py 2010-06-30 22:49:20 UTC (rev 13859)
@@ -20,7 +20,7 @@
self.buttonOk = self.buttonBox_2.button( QDialogButtonBox.Ok )
layers = ftools_utils.getLayerNames([QGis.Point, QGis.Line, QGis.Polygon])
self.inShape.addItems(layers)
-
+
def changed(self, inputLayer):
changedLayer = ftools_utils.getVectorLayerByName(inputLayer)
changedProvider = changedLayer.dataProvider()
@@ -45,11 +45,11 @@
self.progressBar.setValue(50)
value = int(round((value / 100.0000), 4) * layer.featureCount())
self.progressBar.setValue(60)
- selran = random.sample(xrange(0, layer.featureCount()), value)
- self.progressBar.setValue(70)
- self.progressBar.setValue(80)
- self.progressBar.setValue(90)
- self.progressBar.setValue(100)
- layer.setSelectedFeatures(selran)
+ selran = random.sample(xrange(0, layer.featureCount()), value)
+ self.progressBar.setValue(70)
+ self.progressBar.setValue(80)
+ self.progressBar.setValue(90)
+ self.progressBar.setValue(100)
+ layer.setSelectedFeatures(selran)
self.progressBar.setValue(0)
self.buttonOk.setEnabled( True )
More information about the QGIS-commit
mailing list