summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70e3691)
raw | patch | inline | side by side (parent: 70e3691)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 1 Apr 2006 20:36:19 +0000 (20:36 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 1 Apr 2006 20:36:19 +0000 (20:36 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 5cb4ed7f8ca543e621fa9989bfb9ca3c41c0964b..af73a37c2a1fe84130faf7f4028ad8ed7f32ceb5 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
/**
* Change node type, and its handles accordingly.
*/
-static Inkscape::NodePath::Node *sp_nodepath_set_node_type(Inkscape::NodePath::Node *node,Inkscape::NodePath::NodeType type)
+static Inkscape::NodePath::Node *sp_nodepath_set_node_type(Inkscape::NodePath::Node *node, Inkscape::NodePath::NodeType type)
{
g_assert(node);
g_assert(node->subpath);
@@ -880,7 +880,15 @@ static Inkscape::NodePath::Node *sp_nodepath_set_node_type(Inkscape::NodePath::N
sp_knot_update_ctrl(node->knot);
}
- sp_node_adjust_handles(node);
+ // if one of handles is mouseovered, preserve its position
+ if (SP_KNOT_IS_MOSEOVER(node->p.knot)) {
+ sp_node_adjust_handle(node, 1);
+ } else if (SP_KNOT_IS_MOSEOVER(node->n.knot)) {
+ sp_node_adjust_handle(node, -1);
+ } else {
+ sp_node_adjust_handles(node);
+ }
+
sp_node_update_handles(node);
sp_nodepath_update_statusbar(node->subpath->nodepath);