Skip to content

Commit ba4a3cc

Browse files
committed
Ftools-Sum Line length - Fix progress bar
1 parent a39b78b commit ba4a3cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/plugins/fTools/tools/doSumLines.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def compute(self, inPoly, inLns, inField, outPath, progressBar):
112112
inGeom = QgsGeometry()
113113
outGeom = QgsGeometry()
114114
distArea = QgsDistanceArea()
115-
start = 15.00
116-
add = 85.00 / polyProvider.featureCount()
115+
start = 0.00
116+
add = 100.00 / polyProvider.featureCount()
117117
check = QFile(self.shapefileName)
118118
if check.exists():
119119
if not QgsVectorFileWriter.deleteShapeFile(self.shapefileName):
@@ -142,5 +142,5 @@ def compute(self, inPoly, inLns, inField, outPath, progressBar):
142142
#outFeat.setAttribute(index, QVariant(length))
143143
writer.addFeature(outFeat)
144144
start = start + 1
145-
progressBar.setValue(start)
145+
progressBar.setValue( start * (add))
146146
del writer

0 commit comments

Comments
 (0)