Code

Fix for bug #1584301: block invalid snapping results
authordvlierop2 <dvlierop2@users.sourceforge.net>
Thu, 15 Mar 2007 18:29:04 +0000 (18:29 +0000)
committerdvlierop2 <dvlierop2@users.sourceforge.net>
Thu, 15 Mar 2007 18:29:04 +0000 (18:29 +0000)
src/snap.cpp

index 253066ca446a12a06edb20a8e2a1d7ebd3f0bc32..86fae1572520d8921ce2783b649b9e06fd54fd85 100644 (file)
@@ -301,7 +301,9 @@ std::pair<NR::Point, bool> SnapManager::_snapTransformed(
         }
     }
         
-    return std::make_pair(best_transformation, best_metric < NR_HUGE);
+    // Using " < 1e6" instead of " < NR::HUGE" for catching some rounding errors
+    // These rounding errors might be caused by NRRects, see bug #1584301
+    return std::make_pair(best_transformation, best_metric < 1e6);
 }