Skip to content

Commit 705f55e

Browse files
committed
Merge pull request #61 from rduivenvoorde/cf849875
fix for #4500
2 parents 9adb57e + cf84987 commit 705f55e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/qgsmaptoolsimplify.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ bool QgsMapToolSimplify::calculateSliderBoudaries()
212212
bottomFound = true;
213213
highTol = tol;
214214
tol = ( highTol + lowTol ) / 2;
215-
if ( doubleNear( highTol, lowTol ) )
215+
if ( doubleNear( highTol, lowTol, 0.0001 ) ) // without 0.0001 tolerance sometimes an endless loop in epsg:4326
216216
{ //solving problem that two points are in same distance from line, so they will be both excluded at same time
217217
//so some time more than required count of vertices can stay
218218
found = true;
@@ -226,7 +226,7 @@ bool QgsMapToolSimplify::calculateSliderBoudaries()
226226
{
227227
lowTol = tol;
228228
tol = ( highTol + lowTol ) / 2;
229-
if ( doubleNear( highTol, lowTol ) )
229+
if ( doubleNear( highTol, lowTol, 0.0001 ) ) // without 0.0001 tolerance sometimes an endless loop in epsg:4326
230230
{ //solving problem that two points are in same distance from line, so they will be both excluded at same time
231231
//so some time more than required count of vertices can stay
232232
found = true;

0 commit comments

Comments
 (0)