doVectorGrid_py-overshooting.patch
c:/OSGeo4W/apps/qgis/python/plugins/fTools/tools/doVectorGrid.py 2012-07-30 13:09:30 -0500 | ||
---|---|---|
228 | 228 |
count_max = (bound.yMaximum() - bound.yMinimum()) / yOffset |
229 | 229 |
count_update = count_max * 0.05 |
230 | 230 |
y = bound.yMaximum() |
231 |
while y >= bound.yMinimum(): |
|
231 |
while y - yOffset >= bound.yMinimum():
|
|
232 | 232 |
x = bound.xMinimum() |
233 |
while x <= bound.xMaximum(): |
|
233 |
while x + xOffset <= bound.xMaximum():
|
|
234 | 234 |
pt1 = QgsPoint(x, y) |
235 | 235 |
pt2 = QgsPoint(x + xOffset, y) |
236 | 236 |
pt3 = QgsPoint(x + xOffset, y - yOffset) |
... | ... | |
249 | 249 |
y = y - yOffset |
250 | 250 |
count += 1 |
251 | 251 |
if int( math.fmod( count, count_update ) ) == 0: |
252 |
prog = int( count / count_max * 100 ) |
|
252 |
prog = 50 + int( count / count_max * 100 ) |
|
253 |
self.progressBar.setValue( prog ) |
|
253 | 254 | |
254 | 255 |
self.progressBar.setValue( 100 ) |
255 | 256 |
#self.progressBar.setRange( 0, 100 ) |