diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-05-15 13:58:09 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-05-15 13:58:09 +0000 |
| commit | f32d4f1312a6b76838e8131b62f8b33ba6653be5 (patch) | |
| tree | f4c167fb0b8b28b969012510a5e9a32920fafda3 /src/nodepath.cpp | |
| parent | use spatial/linear distance method depending on whether selection is in more ... (diff) | |
| download | inkscape-f32d4f1312a6b76838e8131b62f8b33ba6653be5.tar.gz inkscape-f32d4f1312a6b76838e8131b62f8b33ba6653be5.zip | |
fix potential (though currently impossible) crash when spatial mode is used with a single node
(bzr r845)
Diffstat (limited to 'src/nodepath.cpp')
| -rw-r--r-- | src/nodepath.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp index 236912851..4b9559737 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -1165,10 +1165,15 @@ sp_nodepath_selected_nodes_sculpt(Inkscape::NodePath::Path *nodepath, Inkscape:: for (GList *nl = subpath->nodes; nl != NULL; nl = nl->next) { Inkscape::NodePath::Node *node = (Inkscape::NodePath::Node *) nl->data; if (node->selected) { - sp_nodepath_move_node_and_handles (node, + if (direct_range > 1e-6) { + sp_nodepath_move_node_and_handles (node, sculpt_profile (NR::L2(node->origin - n->origin) / direct_range, alpha) * delta, sculpt_profile (NR::L2(node->n.origin - n->origin) / direct_range, alpha) * delta, sculpt_profile (NR::L2(node->p.origin - n->origin) / direct_range, alpha) * delta); + } else { + sp_nodepath_move_node_and_handles (node, delta, delta, delta); + } + } } } |
