summaryrefslogtreecommitdiffstats
path: root/src/2geom/path.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-09-08 22:20:36 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-09-08 22:20:36 +0000
commitb7b17f36b9e3d2814dcf0f4db1fb329976c2e85a (patch)
tree7d9c97f8bd561cd70afd0fe44e507a6e4f91dfd3 /src/2geom/path.cpp
parentadd missing #include for gtk version check (diff)
downloadinkscape-b7b17f36b9e3d2814dcf0f4db1fb329976c2e85a.tar.gz
inkscape-b7b17f36b9e3d2814dcf0f4db1fb329976c2e85a.zip
2geom update (rev. 1578); fixes node editing of some degenerate paths
(bzr r6784)
Diffstat (limited to 'src/2geom/path.cpp')
-rw-r--r--src/2geom/path.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/2geom/path.cpp b/src/2geom/path.cpp
index ac45459bd..c04d9d08d 100644
--- a/src/2geom/path.cpp
+++ b/src/2geom/path.cpp
@@ -226,6 +226,11 @@ double Path::nearestPoint(Point const &_point, double from, double to, double *d
double eif, et = modf(to, &eif);
unsigned int si = static_cast<unsigned int>(sif);
unsigned int ei = static_cast<unsigned int>(eif);
+ if(sz == 0) {// naked moveto
+ if (distance_squared != NULL)
+ *distance_squared = distanceSq(_point, _path.initialPoint());
+ return 0;
+ }
if ( si == sz )
{
--si;