Skip to content
Permalink
Browse files

[PROCESSING] Fix Progress bar in Dissolve

  • Loading branch information
bstroebl committed Aug 19, 2015
1 parent fd23859 commit 1f81109b4a3ff0c18e2151bc662c2777d2cf9d8a
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 1f81109

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