Skip to content
Permalink
Browse files
fix for #4500, endlessloop because of too small tolerance
  • Loading branch information
rduivenvoorde committed Nov 13, 2011
1 parent be9bdeb commit cf849875a2b9edadb91166c82e733173b6a7a27d
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 cf84987

Please sign in to comment.