summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-05-15 13:58:09 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-05-15 13:58:09 +0000
commitf32d4f1312a6b76838e8131b62f8b33ba6653be5 (patch)
treef4c167fb0b8b28b969012510a5e9a32920fafda3 /src/nodepath.cpp
parentuse spatial/linear distance method depending on whether selection is in more ... (diff)
downloadinkscape-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.cpp7
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);
+ }
+
}
}
}