summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-04-02 16:56:18 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-04-02 16:56:18 +0000
commit80b925c087c47b8cdff1a8b941cf26e250982d30 (patch)
treeedddbf301363fa58ba0294cb133efd1fe98b7071 /src/nodepath.cpp
parentRemoved C99 isnormal from nr-filter-gaussian.cpp (bug 1678363) (diff)
downloadinkscape-80b925c087c47b8cdff1a8b941cf26e250982d30.tar.gz
inkscape-80b925c087c47b8cdff1a8b941cf26e250982d30.zip
fix 1675213: update symm nodes when moving with Ctrl and when adding new node
(bzr r2813)
Diffstat (limited to 'src/nodepath.cpp')
-rw-r--r--src/nodepath.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 1b67944d8..a73661447 100644
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -745,8 +745,10 @@ static Inkscape::NodePath::Node *sp_nodepath_line_add_node(Inkscape::NodePath::N
&start->pos, &start->pos, &start->n.pos);
sp_nodepath_line_midpoint(newnode, end, t);
+ sp_node_adjust_handles(start);
sp_node_update_handles(start);
sp_node_update_handles(newnode);
+ sp_node_adjust_handles(end);
sp_node_update_handles(end);
return newnode;
@@ -3450,12 +3452,14 @@ static void node_handle_moved(SPKnot *knot, NR::Point *p, guint state, gpointer
}
if (( n->type !=Inkscape::NodePath::NODE_CUSP || (state & GDK_SHIFT_MASK))
- && rme.a != HUGE_VAL && rnew.a != HUGE_VAL && fabs(rme.a - rnew.a) > 0.001) {
+ && rme.a != HUGE_VAL && rnew.a != HUGE_VAL && (fabs(rme.a - rnew.a) > 0.001 || n->type ==Inkscape::NodePath::NODE_SYMM)) {
// rotate the other handle correspondingly, if both old and new angles exist and are not the same
rother.a += rnew.a - rme.a;
other->pos = NR::Point(rother) + n->pos;
- sp_ctrlline_set_coords(SP_CTRLLINE(other->line), n->pos, other->pos);
- sp_knot_set_position(other->knot, &other->pos, 0);
+ if (other->knot) {
+ sp_ctrlline_set_coords(SP_CTRLLINE(other->line), n->pos, other->pos);
+ sp_knot_moveto(other->knot, &other->pos);
+ }
}
me->pos = NR::Point(rnew) + n->pos;