chiark / gitweb /
Use the proper function for checking if 2 vertexes are almost equal.
authordaid <daid303@gmail.com>
Fri, 1 Jun 2012 11:27:19 +0000 (13:27 +0200)
committerdaid <daid303@gmail.com>
Fri, 1 Jun 2012 11:27:19 +0000 (13:27 +0200)
Cura/gui/opengl.py

index 2c6625ee0dfd627f19d1c7ce9ed059018007aabf..7f6fcb12a569a244846e9d2c06463063f947b039 100644 (file)
@@ -313,6 +313,6 @@ def DrawGCodeLayer(layer):
                                glVertex3f(v.x, v.y, v.z)\r
                        glEnd()\r
                prevPathWasRetract = False\r
-               if path.type == 'retract' and (path.list[0] - path.list[-1]).vsize() < 0.001:\r
+               if path.type == 'retract' and path.list[0].almostEqual(path.list[-1]):\r
                        prevPathWasRetract = True\r
        glEnable(GL_CULL_FACE)\r