Skip to content
Permalink
Browse files
fix for #4500, endlessloop because of too small tolerance
  • Loading branch information
rduivenvoorde authored and alexbruy committed Dec 2, 2011
1 parent 57da39a commit 3a58d8c0cba0c2fae8db8b58295fcf1478e8085c
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/qgsmaptoolsimplify.cpp
@@ -212,7 +212,7 @@ bool QgsMapToolSimplify::calculateSliderBoudaries()
bottomFound = true;
highTol = tol;
tol = ( highTol + lowTol ) / 2;
if ( doubleNear( highTol, lowTol ) )
if ( doubleNear( highTol, lowTol, 0.0001 ) ) // without 0.0001 tolerance sometimes an endless loop in epsg:4326
{ //solving problem that two points are in same distance from line, so they will be both excluded at same time
//so some time more than required count of vertices can stay
found = true;
@@ -226,7 +226,7 @@ bool QgsMapToolSimplify::calculateSliderBoudaries()
{
lowTol = tol;
tol = ( highTol + lowTol ) / 2;
if ( doubleNear( highTol, lowTol ) )
if ( doubleNear( highTol, lowTol, 0.0001 ) ) // without 0.0001 tolerance sometimes an endless loop in epsg:4326
{ //solving problem that two points are in same distance from line, so they will be both excluded at same time
//so some time more than required count of vertices can stay
found = true;

0 comments on commit 3a58d8c

Please sign in to comment.