Skip to content

Commit

Permalink
patch from alex to fix #2735
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13859 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Jun 30, 2010
1 parent 56b9a26 commit bc166a8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/plugins/fTools/tools/doRandom.py
Expand Up @@ -20,7 +20,7 @@ def __init__(self, iface):
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()
Expand All @@ -45,11 +45,11 @@ def accept(self):
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 )

0 comments on commit bc166a8

Please sign in to comment.