Skip to content
Permalink
Browse files

Merge pull request #2260 from bstroebl/fixDissolve

[PROCESSING] Fix Progress bar in Dissolve
  • Loading branch information
m-kuhn committed Aug 19, 2015
2 parents fd23859 + 1f81109 commit d5d7c580ab9614f38ef000d663df9c0d8418874b
Showing with 7 additions and 3 deletions.
  1. +7 −3 python/plugins/processing/algs/qgis/Dissolve.py
@@ -61,13 +61,17 @@ def processAlgorithm(self, progress):
vproviderA.crs())
outFeat = QgsFeature()
nElement = 0
nFeat = vproviderA.featureCount()
nFeat = vlayerA.selectedFeatureCount()

if nFeat == 0:
nFeat = vlayerA.featureCount()

if not useField:
first = True
features = vector.features(vlayerA)
for inFeat in features:
nElement += 1
progress.setPercentage(int(nElement / nFeat * 100))
progress.setPercentage(int(nElement * 100/ nFeat))
if first:
attrs = inFeat.attributes()
tmpInGeom = QgsGeometry(inFeat.geometry())
@@ -93,7 +97,7 @@ def processAlgorithm(self, progress):
features = vector.features(vlayerA)
for inFeat in features:
nElement += 1
progress.setPercentage(int(nElement / nFeat * 100))
progress.setPercentage(int(nElement * 100/ nFeat))
atMap = inFeat.attributes()
tempItem = atMap[field]
if unicode(tempItem).strip() == unicode(item).strip():

0 comments on commit d5d7c58

Please sign in to comment.
You can’t perform that action at this time.