]> git.tokkee.org Git - inkscape.git/commitdiff

Code

fix 1517414
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 8 Jan 2007 09:26:30 +0000 (09:26 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 8 Jan 2007 09:26:30 +0000 (09:26 +0000)
src/nodepath.cpp

index be0a2eb1e28524860aba9d96e656af737920b098..a224f81a551ac088038831fb515a296f26896e33 100644 (file)
@@ -2219,7 +2219,10 @@ sp_node_selected_delete_segment(void)
         //Copy everything after 'end' to a new subpath
        Inkscape::NodePath::SubPath *t = sp_nodepath_subpath_new(nodepath);
         for (curr=end ; curr ; curr=curr->n.other) {
-            sp_nodepath_node_new(t, NULL, (Inkscape::NodePath::NodeType)curr->type, (NRPathcode)curr->code,
+            NRPathcode code = (NRPathcode) curr->code;
+            if (curr == end)
+                code = NR_MOVETO;
+            sp_nodepath_node_new(t, NULL, (Inkscape::NodePath::NodeType)curr->type, code,
                                  &curr->p.pos, &curr->pos, &curr->n.pos);
         }